Vsyncs are hard

Bug: 18866485
Change-Id: I7d304df0f20a3296956cb6887a72adba9243f117
This commit is contained in:
John Reck
2015-01-14 10:40:15 -08:00
parent 820088587e
commit a22c9b2cd1

View File

@@ -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;