diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2014-09-19 11:10:17 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-09-23 10:46:22 +1000 |
commit | 4913fd7a4806e54ebe4eb7f5f3f1d2fa3b8fdbdb (patch) | |
tree | 9d373ac433af729acdd996a12c5efba5ad10f1cd /src/filter.h | |
parent | fa363ed0e847d28daefbf990b1e183f369d8c96e (diff) | |
download | libinput-4913fd7a4806e54ebe4eb7f5f3f1d2fa3b8fdbdb.tar.gz |
Replace pointer acceleration with a much simpler linear one
We ran a userstudy, evaluating three different accel methods. Detailed results are
available at:
http://www.who-t.net/publications/hutterer2014_libinput_ptraccel_study.pdf
We found that there was little difference between the method we had in
libinput 0.6 and this three-line function. Users didn't really notice a
difference, but measured data suggests that it has slight advantages in some
use-cases.
The method proposed here is the one labeled "linear" in the paper, its profile
looks roughly like this:
_____________
/
____/
/
/
where the x axis is the speed, y is the acceleration factor.
The first plateau is at the acceleration factor 1 (i.e. unaccelerated
movement), the second plateau is at the max acceleration factor. The threshold
in the code defines where and how long the plateau is.
Differences to the previous accel function:
- both inclines are linear rather than curved
- the second incline is less steep than the current method
From a maintainer's point-of-view, this function is significantly easier to
understand and manipulate than the previous one.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/filter.h')
-rw-r--r-- | src/filter.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/filter.h b/src/filter.h index 85534952..be48838c 100644 --- a/src/filter.h +++ b/src/filter.h @@ -65,14 +65,9 @@ create_pointer_accelator_filter(accel_profile_func_t filter); * Pointer acceleration profiles. */ -/* - * Profile similar which is similar to nonaccelerated but with a smooth - * transition between accelerated and non-accelerated. - */ double -pointer_accel_profile_smooth_simple(struct motion_filter *filter, - void *data, - double velocity, - uint64_t time); - +pointer_accel_profile_linear(struct motion_filter *filter, + void *data, + double speed_in, + uint64_t time); #endif /* FILTER_H */ |