summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/EventThread.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2012-01-31 16:46:27 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2012-01-31 16:46:27 -0800
commitdcaf1adcb685759bad2b4720b650a63b76b278b9 (patch)
tree2370553c3015f6627eb345a058a76c0fbdf5c20f /services/surfaceflinger/EventThread.cpp
parentb17932fe84f84a660194d25d56ce06324b1bf28d (diff)
parent58737fe96d9e5027e36a983161ab1888592b3eb8 (diff)
Merge "fix an issue with vsync event delivery"
Diffstat (limited to 'services/surfaceflinger/EventThread.cpp')
-rw-r--r--services/surfaceflinger/EventThread.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 92d4266a8fd9..af0da0bdb22c 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -151,9 +151,9 @@ bool EventThread::threadLoop() {
mLastVSyncTimestamp = timestamp;
// now see if we still need to report this VSYNC event
- bool reportVsync = false;
- size_t count = mDisplayEventConnections.size();
+ const size_t count = mDisplayEventConnections.size();
for (size_t i=0 ; i<count ; i++) {
+ bool reportVsync = false;
const ConnectionInfo& info(
mDisplayEventConnections.valueAt(i));
if (info.count >= 1) {
@@ -174,11 +174,7 @@ bool EventThread::threadLoop() {
displayEventConnections.add(mDisplayEventConnections.keyAt(i));
}
}
-
- if (reportVsync) {
- break;
- }
- } while (true);
+ } while (!displayEventConnections.size());
// dispatch vsync events to listeners...
vsync.header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC;