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

Commit a22c9b2c authored by John Reck's avatar John Reck
Browse files

Vsyncs are hard

Bug: 18866485
Change-Id: I7d304df0f20a3296956cb6887a72adba9243f117
parent 82008858
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -284,6 +284,14 @@ bool RenderThread::threadLoop() {
            mPendingRegistrationFrameCallbacks.clear();
            requestVsync();
        }

        if (!mFrameCallbackTaskPending && !mVsyncRequested && mFrameCallbacks.size()) {
            // TODO: Clean this up. This is working around an issue where a combination
            // of bad timing and slow drawing can result in dropping a stale vsync
            // on the floor (correct!) but fails to schedule to listen for the
            // next vsync (oops), so none of the callbacks are run.
            requestVsync();
        }
    }

    return false;