diff options
author | jdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-01 17:44:57 +0000 |
---|---|---|
committer | jdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-01 17:44:57 +0000 |
commit | 585930ff1c7912e259bce218b9d15ce79d0ecb60 (patch) | |
tree | 2933d88050e1cd22d46f36d6190a98705d32b2ef /ui/events/gestures | |
parent | c499f79c27d16ac0d576a00ec14deee29f6663aa (diff) | |
download | chromium_src-585930ff1c7912e259bce218b9d15ce79d0ecb60.zip chromium_src-585930ff1c7912e259bce218b9d15ce79d0ecb60.tar.gz chromium_src-585930ff1c7912e259bce218b9d15ce79d0ecb60.tar.bz2 |
Support vsync-aligned input with a MotionEventBuffer
The MotionEventBuffer provides buffering and event synthesis using a regular,
on-demand time signal. Only compatible movement events are buffered,
with hard limits on both extrapolation (the prediction horizon) and
interpolation (the delta between events). Note that this patch does not
actually wire up buffering to the current pipeline, rather, it simply adds the
utilities for doing so with associated unit tests.
See the design doc at http://goo.gl/MdmpCf for more details.
BUG=394562
Review URL: https://codereview.chromium.org/398203003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/events/gestures')
-rw-r--r-- | ui/events/gestures/gesture_provider_aura.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc index 7485cda..079884e 100644 --- a/ui/events/gestures/gesture_provider_aura.cc +++ b/ui/events/gestures/gesture_provider_aura.cc @@ -23,13 +23,8 @@ GestureProviderAura::GestureProviderAura(GestureProviderAuraClient* client) GestureProviderAura::~GestureProviderAura() {} bool GestureProviderAura::OnTouchEvent(const TouchEvent& event) { - bool pointer_id_is_active = false; - for (size_t i = 0; i < pointer_state_.GetPointerCount(); ++i) { - if (event.touch_id() != pointer_state_.GetPointerId(i)) - continue; - pointer_id_is_active = true; - break; - } + bool pointer_id_is_active = + pointer_state_.FindPointerIndexOfId(event.touch_id()) != -1; if (event.type() == ET_TOUCH_PRESSED && pointer_id_is_active) { // Ignore touch press events if we already believe the pointer is down. |