am 39c5ea2c: am ee874caa: Merge "DispSync: remove delay when enabling vsync events" into klp-dev

* commit '39c5ea2caaddd7ea44eaeed38d3760fbc421ad56':
  DispSync: remove delay when enabling vsync events
This commit is contained in:
Jamie Gennis 2013-11-05 12:02:26 -08:00 committed by Android Git Automerger
commit 1a8e6bf966
1 changed files with 8 additions and 1 deletions

View File

@ -164,7 +164,14 @@ public:
EventListener listener;
listener.mPhase = phase;
listener.mCallback = callback;
listener.mLastEventTime = systemTime(SYSTEM_TIME_MONOTONIC);
// We want to allow the firstmost future event to fire without
// allowing any past events to fire. Because
// computeListenerNextEventTimeLocked filters out events within a half
// a period of the last event time, we need to initialize the last
// event time to a half a period in the past.
listener.mLastEventTime = systemTime(SYSTEM_TIME_MONOTONIC) - mPeriod / 2;
mEventListeners.push(listener);
mCond.signal();