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

Commit 869347fc authored by Jeff Brown's avatar Jeff Brown
Browse files

Make the throttling more sensitive to end-to-end latency.

The code now takes into account the time when the event was generated.
So with a 60Hz throttling rate, it ensures that a motion event will not
be delayed due to throttling by any more than 1/60th of second past
the time it was generated.

Change-Id: Iaea1d4f76e79036b4a18873485230731c3cd63c3
parent 6b5e70b7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -201,7 +201,8 @@ void InputDispatcher::dispatchOnce() {
                    }
#endif

                    mThrottleState.lastEventTime = currentTime;
                    mThrottleState.lastEventTime = entry->eventTime < currentTime
                            ? entry->eventTime : currentTime;
                    mThrottleState.lastDeviceId = deviceId;
                    mThrottleState.lastSource = source;
                }