summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-03-14 19:39:54 -0700
committerJeff Brown <jeffbrown@android.com>2011-05-23 17:19:59 -0700
commitc5982b7bee75467f50d681ad54120eadc7a8d88e (patch)
treece642e8e4ff44eea0be88e541a1d98db4e67d36f /opengl/tests/gl_basic/gl_basic.cpp
parent247da72a5bb1e762c73723fd2d495c9a6c4f1c68 (diff)
Improve VelocityTracker numerical stability. (DO NOT MERGE)
Replaced VelocityTracker with a faster and more accurate native implementation. This avoids the duplicate maintenance overhead of having two implementations. The new algorithm requires that the sample duration be at least 10ms in order to contribute to the velocity calculation. This ensures that the velocity is not severely overestimated when samples arrive in bursts. The new algorithm computes the exponentially weighted moving average using weights based on the relative duration of successive sample periods. The new algorithm is also more careful about how it handles individual pointers going down or up and their effects on the collected movement traces. The intent is to preserve the last known velocity of pointers as they go up while also ensuring that other motion samples do not count twice in that case. Bug: 4086785 Change-Id: I95054102397c4b6a9076dc6a0fc841b4beec7920
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions