summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2017-11-06 21:16:47 -0800
committer Siarhei Vishniakou <svv@google.com> 2018-03-09 14:53:02 -0800
commit3bb597138bc53416b3049caa48c618075ec24231 (patch)
tree6edd367d43b5b9d03fdcc4a587d694b5dd7de61d /libs/gui/ConsumerBase.cpp
parentb5b25545e6909ee0705e29c3d76f07a788189aae (diff)
Fix resampling for multiple pointers
If more than one pointer is present and identical coordinates are encountered for any pointer, the lastResample value will not be invalidated (by clearing its bits). As a result, the same lastResample value will be used to subsequently rewriteMessage any time in the future. This can cause significant jumps in the pointer coordinates, and is a bug. To further clarify, this bug has only to do with resampling and nothing to do with both pointers having the same X or Y value. This CL makes this logic to be per-pointer. As soon as non-identical value is encountered and the timing conditions are such that the resampled value is not needed to be used, the lastResample bit for that pointer will be cleared, meaning that the value in lastResample for this pointer is stale. This value will no longer be used anywhere. When performing resampling, allow the process to happen on a per-pointer basis. If one of the pointers has encountered events with identical coordinates, then use the previously resampled value (do not resample again), if that value is still valid (see above). Otherwise, the normal resampling path will be taken. On the other pointers that do not have identical coordinates, go through the normal path as well. Bug: 68840121 Test: recorded a repro event with inputstudio and replayed it while observing the screen. Saw that the coordinates jump before the fix, and do not jump with the fix. Change-Id: If43c323759de8f0184b76221d1ae599a75349ce9 Merged-In: If43c323759de8f0184b76221d1ae599a75349ce9
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions