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

Commit 80139298 authored by Paras Morabia's avatar Paras Morabia Committed by Giulio Cervera
Browse files

SurfaceFlinger: Dont skip composition if it is incomplete.

If the composition is not complete because of suspend we need at least
one complete composition to happen without skipping.

Set force composition flag so that next time hwc does not skip the
composition.

CRs-fixed: 374830
(cherry picked from commit f03f679fc34eb839c801330e58c3c898a392a3b6)

Change-Id: Id907e6ff259aef7caec32c6edc44bb6082c583bb
parent f6134e7c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -487,6 +487,13 @@ bool SurfaceFlinger::threadLoop()
        // pretend we did the post
        hw.compositionComplete();
        usleep(16667); // 60 fps period

#ifdef QCOM_HARDWARE
        //If the draw is skipped by any chance, we need to force
        //composition atleast once.
        HWComposer& hwc(hw.getHwComposer());
        hwc.perform(EVENT_FORCE_COMPOSITION, 1);
#endif
    }
    return true;
}