diff options
| author | 2015-01-15 01:08:56 +0000 | |
|---|---|---|
| committer | 2015-01-15 01:08:57 +0000 | |
| commit | 53af1cd3930a398b2008c4be9c10e5182392ffaf (patch) | |
| tree | 4eb04dafd9140f91dcb00e9d56dea09a1d371759 /libs | |
| parent | aa229902ef73f8777768414092eaf99eeff05f87 (diff) | |
| parent | a22c9b2cd171a656fa684d57a915dbe636da5f6a (diff) | |
Merge "Vsyncs are hard" into lmp-mr1-dev
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 3e4e9653518c..84826b7a3bff 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; |