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
This commit is contained in:
parent
6b5e70b701
commit
869347fc62
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user