Allow repeated fling boosting for accelerated scrolling
commitedcc1a15e7c945bf5a38dc9fdb58b6315cf2fb5a
authorjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 6 May 2014 01:26:39 +0000 (6 01:26 +0000)
committerjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 6 May 2014 01:26:39 +0000 (6 01:26 +0000)
tree10fe439c2f29c73dc3c7551c9b867b4722c4e3ea
parent69c13a259664a93950880e9921eb1256e697c5f7
Allow repeated fling boosting for accelerated scrolling

Scrolling long documents on Android is a laborious, sad affair.  Native Android
view's address this with a "flywheel" fling mechanism, whereby successive flings
in similar directions accumulative velocity. Add such a feature to
InputHandlerProxy, allowing compositor-driven flings on all platforms to
quickly accelerate to infinity and beyond.

Flings will accumulate if the following conditions are met:
  - The active and new flings target the same layer, are in a similar direction,
    and are both of sufficient velocity.
  - All scroll update events received during the active fling and preceding the
    new fling are in a similar direction and of sufficient velocity.

Note: This approach is not suitable to WebView; it relies heavily on the fling
accumulator living "close" to the fling driver.  It also does not affect
main-thread driven flings.

BUG=164116

Review URL: https://codereview.chromium.org/239433010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268363 0039d316-1c4b-4281-b951-d872f2087c98
15 files changed:
cc/input/input_handler.h
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl.h
cc/trees/layer_tree_host_impl_unittest.cc
content/renderer/input/input_handler_proxy.cc
content/renderer/input/input_handler_proxy.h
content/renderer/input/input_handler_proxy_unittest.cc
content/renderer/input/input_handler_wrapper.cc
ui/events/gesture_detection/gesture_event_data_packet.cc
ui/events/gesture_detection/gesture_event_data_packet.h
ui/events/gesture_detection/mock_motion_event.cc
ui/events/gesture_detection/mock_motion_event.h
ui/events/gesture_detection/touch_disposition_gesture_filter.cc
ui/events/gesture_detection/touch_disposition_gesture_filter.h
ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc