Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39c5ea2c authored by Jamie Gennis's avatar Jamie Gennis Committed by Android Git Automerger
Browse files

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

* commit 'ee874caa':
  DispSync: remove delay when enabling vsync events
parents 18f94b1e ee874caa
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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();