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

Side by Side Diff: ui/aura/gestures/gesture_sequence.cc

Issue 9310031: Event smoothing in CrOS gesture recognizer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cache velocity data in VelocityCalculator. Created 8 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/gestures/gesture_sequence.h" 5 #include "ui/aura/gestures/gesture_sequence.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 #include "ui/base/events.h" 10 #include "ui/base/events.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 bool GestureSequence::TouchDown(const TouchEvent& event, 234 bool GestureSequence::TouchDown(const TouchEvent& event,
235 const GesturePoint& point, Gestures* gestures) { 235 const GesturePoint& point, Gestures* gestures) {
236 AppendTapDownGestureEvent(point, gestures); 236 AppendTapDownGestureEvent(point, gestures);
237 set_state(GS_PENDING_SYNTHETIC_CLICK); 237 set_state(GS_PENDING_SYNTHETIC_CLICK);
238 return false; 238 return false;
239 } 239 }
240 240
241 bool GestureSequence::ScrollEnd(const TouchEvent& event, 241 bool GestureSequence::ScrollEnd(const TouchEvent& event,
242 const GesturePoint& point, Gestures* gestures) { 242 GesturePoint& point, Gestures* gestures) {
243 if (point.IsInFlickWindow(event)) 243 if (point.IsInFlickWindow(event))
244 AppendScrollGestureEnd(point, gestures, point.x_velocity(), 244 AppendScrollGestureEnd(point, gestures, point.XVelocity(),
245 point.y_velocity()); 245 point.YVelocity());
246 else 246 else
247 AppendScrollGestureEnd(point, gestures, 0.f, 0.f); 247 AppendScrollGestureEnd(point, gestures, 0.f, 0.f);
248 Reset(); 248 Reset();
249 return false; 249 return false;
250 } 250 }
251 251
252 } // namespace aura 252 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698