Loading services/surfaceflinger/DisplayDevice.cpp +17 −12 Original line number Diff line number Diff line Loading @@ -475,11 +475,17 @@ void DisplayDevice::onVrrIdle(bool idle) { } } void DisplayDevice::animateOverlay() { void DisplayDevice::animateRefreshRateOverlay() { if (mRefreshRateOverlay) { mRefreshRateOverlay->animate(); } if (mHdrSdrRatioOverlay) { } void DisplayDevice::animateHdrSdrRatioOverlay() { if (!mHdrSdrRatioOverlay) { return; } // hdr sdr ratio is designed to be on the top right of the screen, // therefore, we need to re-calculate the display's width and height if (mIsOrientationChanged) { Loading @@ -492,7 +498,6 @@ void DisplayDevice::animateOverlay() { } mHdrSdrRatioOverlay->animate(); } } void DisplayDevice::adjustRefreshRate(Fps pacesetterDisplayRefreshRate) { using fps_approx_ops::operator<=; Loading services/surfaceflinger/DisplayDevice.h +2 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,8 @@ public: REQUIRES(kMainThreadContext); void updateRefreshRateOverlayRate(Fps refreshRate, Fps renderFps, bool setByHwc = false); bool isRefreshRateOverlayEnabled() const { return mRefreshRateOverlay != nullptr; } void animateOverlay(); void animateRefreshRateOverlay(); void animateHdrSdrRatioOverlay(); bool onKernelTimerChanged(std::optional<DisplayModeId>, bool timerExpired); void onVrrIdle(bool idle); Loading services/surfaceflinger/SurfaceFlinger.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -2778,10 +2778,16 @@ bool SurfaceFlinger::commit(PhysicalDisplayId pacesetterId, mPowerAdvisor->updateTargetWorkDuration(idealVsyncPeriod); } if (mRefreshRateOverlaySpinner || mHdrSdrRatioOverlay) { if (mRefreshRateOverlaySpinner) { Mutex::Autolock lock(mStateLock); if (const auto display = getDefaultDisplayDeviceLocked()) { display->animateOverlay(); for (const auto& [_, display] : mDisplays) { display->animateRefreshRateOverlay(); } } if (mHdrSdrRatioOverlay) { Mutex::Autolock lock(mStateLock); for (const auto& [_, display] : mDisplays) { display->animateHdrSdrRatioOverlay(); } } Loading Loading
services/surfaceflinger/DisplayDevice.cpp +17 −12 Original line number Diff line number Diff line Loading @@ -475,11 +475,17 @@ void DisplayDevice::onVrrIdle(bool idle) { } } void DisplayDevice::animateOverlay() { void DisplayDevice::animateRefreshRateOverlay() { if (mRefreshRateOverlay) { mRefreshRateOverlay->animate(); } if (mHdrSdrRatioOverlay) { } void DisplayDevice::animateHdrSdrRatioOverlay() { if (!mHdrSdrRatioOverlay) { return; } // hdr sdr ratio is designed to be on the top right of the screen, // therefore, we need to re-calculate the display's width and height if (mIsOrientationChanged) { Loading @@ -492,7 +498,6 @@ void DisplayDevice::animateOverlay() { } mHdrSdrRatioOverlay->animate(); } } void DisplayDevice::adjustRefreshRate(Fps pacesetterDisplayRefreshRate) { using fps_approx_ops::operator<=; Loading
services/surfaceflinger/DisplayDevice.h +2 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,8 @@ public: REQUIRES(kMainThreadContext); void updateRefreshRateOverlayRate(Fps refreshRate, Fps renderFps, bool setByHwc = false); bool isRefreshRateOverlayEnabled() const { return mRefreshRateOverlay != nullptr; } void animateOverlay(); void animateRefreshRateOverlay(); void animateHdrSdrRatioOverlay(); bool onKernelTimerChanged(std::optional<DisplayModeId>, bool timerExpired); void onVrrIdle(bool idle); Loading
services/surfaceflinger/SurfaceFlinger.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -2778,10 +2778,16 @@ bool SurfaceFlinger::commit(PhysicalDisplayId pacesetterId, mPowerAdvisor->updateTargetWorkDuration(idealVsyncPeriod); } if (mRefreshRateOverlaySpinner || mHdrSdrRatioOverlay) { if (mRefreshRateOverlaySpinner) { Mutex::Autolock lock(mStateLock); if (const auto display = getDefaultDisplayDeviceLocked()) { display->animateOverlay(); for (const auto& [_, display] : mDisplays) { display->animateRefreshRateOverlay(); } } if (mHdrSdrRatioOverlay) { Mutex::Autolock lock(mStateLock); for (const auto& [_, display] : mDisplays) { display->animateHdrSdrRatioOverlay(); } } Loading