diff options
author | John Reck <jreck@google.com> | 2015-01-14 10:40:15 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2015-01-14 10:40:15 -0800 |
commit | a22c9b2cd171a656fa684d57a915dbe636da5f6a (patch) | |
tree | d7b4e944191fc2dc62d12f1e2bb4b73642267fc4 /libs | |
parent | 820088587e732fe04b705248a06f275bf264be33 (diff) | |
download | frameworks_base-a22c9b2cd171a656fa684d57a915dbe636da5f6a.zip frameworks_base-a22c9b2cd171a656fa684d57a915dbe636da5f6a.tar.gz frameworks_base-a22c9b2cd171a656fa684d57a915dbe636da5f6a.tar.bz2 |
Vsyncs are hard
Bug: 18866485
Change-Id: I7d304df0f20a3296956cb6887a72adba9243f117
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 3e4e965..84826b7 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -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; |