Per-pointer processing in VelocityTracker
We would like to skip resampled data in VelocityTracker when the velocity is being computed. To make this happen, we need to first process the data per-pointer. This will then allow us to skip individual data points. To minimize the impact to older VT strategies that are largely untested, the main change here is to make 'mMovements' and 'mIndex' become per-pointer, rather than converting to a vector. Also, use std::array instead of [] because [] cannot be used inside a std::map easily. There should be no functional change in this CL. The actual skipping of resampled values will be done in a separate CL. Bug: 167946721 Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Change-Id: I1c3c845bca0d4bb7d2c3973bfe84462139ac36f3
Showing
- include/input/VelocityTracker.h 24 additions, 44 deletionsinclude/input/VelocityTracker.h
- libs/input/VelocityControl.cpp 4 additions, 3 deletionslibs/input/VelocityControl.cpp
- libs/input/VelocityTracker.cpp 174 additions, 177 deletionslibs/input/VelocityTracker.cpp
- libs/input/tests/VelocityTracker_test.cpp 1 addition, 1 deletionlibs/input/tests/VelocityTracker_test.cpp
- services/inputflinger/reader/mapper/TouchInputMapper.cpp 4 additions, 7 deletionsservices/inputflinger/reader/mapper/TouchInputMapper.cpp
Loading
Please register or sign in to comment