Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: ui/events/gestures/gesture_provider_aura.cc

Issue 393953012: Eager Gesture Recognition on Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/gestures/gesture_provider_aura.cc
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc
index 7485cda70e9fad124277642a8c685ecd0f9f3648..bf2deb325f0d2305038ec5fe4c5def25a6335a8b 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -28,6 +28,17 @@ bool GestureProviderAura::OnTouchEvent(const TouchEvent& event) {
if (event.touch_id() != pointer_state_.GetPointerId(i))
continue;
pointer_id_is_active = true;
+
+ // If this is a touchmove event, and it isn't different from the last
+ // event, ignore it.
+ if (event.type() == ET_TOUCH_MOVED &&
+ event.x() == pointer_state_.GetX(i) &&
+ event.y() == pointer_state_.GetY(i) &&
+ std::max(event.radius_x(), event.radius_y()) * 2 ==
+ pointer_state_.GetTouchMajor(i) &&
+ event.force() == pointer_state_.GetPressure(i)) {
jdduke (slow) 2014/07/30 15:29:32 How noisy are force/radius values compared to posi
tdresser 2014/07/31 15:33:31 The amount of noise depends entirely on the firmwa
jdduke (slow) 2014/07/31 16:19:02 It's not that I feel strongly about it, more so th
tdresser 2014/08/01 13:35:32 Done.
+ return false;
+ }
break;
}

Powered by Google App Engine
This is Rietveld 408576698