OSDN Git Service

DispSync: don't compensate for wakeup latency
authorJamie Gennis <jgennis@google.com>
Thu, 10 Oct 2013 00:49:37 +0000 (17:49 -0700)
committerJamie Gennis <jgennis@google.com>
Thu, 10 Oct 2013 00:56:42 +0000 (17:56 -0700)
This change removes the wakeup latency compensation from the software-generated
vsync events.  Choreographer can't handle timestamps in the future, so don't
aim for early wake-ups with the expectation that the actual wake-up will be
late.

Bug: 11153576

services/surfaceflinger/DispSync.cpp

index 7e67138..bff304e 100644 (file)
@@ -110,7 +110,7 @@ public:
                 }
 
                 nextEventTime = computeNextEventTimeLocked(now);
-                targetTime = nextEventTime - mWakeupLatency;
+                targetTime = nextEventTime;
 
                 bool isWakeup = false;
 
@@ -228,7 +228,7 @@ private:
             nsecs_t t = computeListenerNextEventTimeLocked(mEventListeners[i],
                     ref);
 
-            if (t - mWakeupLatency < now) {
+            if (t < now) {
                 CallbackInvocation ci;
                 ci.mCallback = mEventListeners[i].mCallback;
                 ci.mEventTime = t;