summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-01-15 01:39:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-15 01:39:50 +0000
commitcefeb34e4866209e2ccf4c520919fe31a3f1aeb5 (patch)
treefea8262b6a42bc41e5a84a65a4858ca37ecd0c21 /libs
parentc83245be678608533ce53005f4149719f6dd5e03 (diff)
parent2c9f86aa21b8d7ea6a77eaca9a49ccdb31245129 (diff)
downloadframeworks_base-cefeb34e4866209e2ccf4c520919fe31a3f1aeb5.zip
frameworks_base-cefeb34e4866209e2ccf4c520919fe31a3f1aeb5.tar.gz
frameworks_base-cefeb34e4866209e2ccf4c520919fe31a3f1aeb5.tar.bz2
am 2c9f86aa: am 53af1cd3: Merge "Vsyncs are hard" into lmp-mr1-dev
* commit '2c9f86aa21b8d7ea6a77eaca9a49ccdb31245129': Vsyncs are hard
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp8
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;