This patch adds a Kalman filter to the evdev touch plugin
which samples velocity and position in x and y direction
and uses this to emit touch points in sync with the application's
repaint rate. The filter also allows for basic prediction
based on current position and velocity estimates.
Filtering is opt-in, and can be enabled by passing for instance
> app -plugin evdevtouch:/dev/touchscreen:filtered:prediction=16
The logic relies on a stable QWindow::requestUpdate() and will work
best in combination with QtQuick and blocking swap buffers (or
equivalent). QScreen::refreshRate() will also have to be reasonably
accurate.
[ChangeLog][Platform Specific Changes] The evdevtouch plugin now
has the option to apply filtering and prediction. Enabled by
passing "filtered" as an argument. Prediction can be specified
by passing "prediction=X" as an argument, where X is in
milliseconds.
Change-Id: I682db4386fe3a7cef8b4a08ea0d16c1491efb873
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>