Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0bd62e7 authored by Yifei Zhang's avatar Yifei Zhang
Browse files

surfaceflinger: repaint on DOZE_SUSPEND exit

This will force SF push out one more frame when transitioning out of
DOZE_SUSPEND. This will allow display to update with the latest frame
generated by the AP if MCU has drawn something on screen.

Bug: 191264924
Bug: 189731001
Change-Id: I491134973c00e98bf1c9f5af2ec37d4e0e5e547b
(cherry picked from commit 45ebe726419d344d5cf4abc83d71f1847b60e86a)
parent 40889a19
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4920,6 +4920,9 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& display, hal:
        // Update display while dozing
        getHwComposer().setPowerMode(displayId, mode);
        if (isDisplayActiveLocked(display) && currentMode == hal::PowerMode::DOZE_SUSPEND) {
            ALOGI("Force repainting for DOZE_SUSPEND -> DOZE or ON.");
            mVisibleRegionsDirty = true;
            scheduleRepaint();
            mScheduler->onScreenAcquired(mAppConnectionHandle);
            mScheduler->resyncToHardwareVsync(true, refreshRate);
        }