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

Commit 70a8f0ea authored by Vishnu Nair's avatar Vishnu Nair
Browse files

HWUI: Finish frame callbacks before framecomplete callbacks

If returning early from a draw, there is a chance that the frame
complete callbacks can execute before the frame callbacks. To fix
this, explicitly wait on frame callbacks to complete.

Test: Enable blast and test split screen resize
Change-Id: Id0eabd4dacdccbf1ce774efaad51abae7c57d5ea
parent 9bce5e0c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -465,6 +465,7 @@ void CanvasContext::draw() {
        mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame);
        // Notify the callbacks, even if there's nothing to draw so they aren't waiting
        // indefinitely
        waitOnFences();
        for (auto& func : mFrameCompleteCallbacks) {
            std::invoke(func, mFrameNumber);
        }