Make VelocityTracker 1D
Currently, VelocityTracker is strictly tied to X and Y axes. It's APIs act on both axes, and its component structs (e.g. Position, Estimator) are tied to both X and Y axes. As a step towards supporting more axes for velocity tracking, this change: - removes the Position struct: stores/processes data as pure floats, one axis at a time - makes Estimator and Strategy specific to a single axis, instead of dealing with both/only X and Y at the same time Furthermore, we have pulled into VelocityTracker the logic to compute all velocity. This helps making the immediate JNI layer light-weight in addition to allowing us to test the logic (which is non-trivial and benefits from tests). Bug: 32830165 Test: VelocityTracker_test unaffected (atest libinput_tests) Change-Id: I181af7a033eb647e9cb97db9b86a36ae972290a5
Loading
Please register or sign in to comment