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

Issue 9310031: Event smoothing in CrOS gesture recognizer. (Closed)

Created:
8 years, 10 months ago by tdresser
Modified:
8 years, 10 months ago
CC:
chromium-reviews, dhollowa+watch_chromium.org, sadrul, ben+watch_chromium.org, rjkroege, sky
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Event smoothing in aura gesture recognizer. Each GesturePoint owns a VelocityCalculator, which maintains a history of touch positions and times, and gives the GesturePoint its velocity. An ordinary least squares regression is used to calculate the velocities. BUG=110229 TEST=aura_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=120835 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120996 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=121201

Patch Set 1 #

Patch Set 2 : Minor naming fixes, comments. #

Total comments: 7

Patch Set 3 : Time stored in microseconds. All velocity logic moved from GesturePoint to VelocityCalculator. #

Total comments: 3

Patch Set 4 : Reduce number of divides #

Patch Set 5 : Cache velocity data in VelocityCalculator. #

Total comments: 8

Patch Set 6 : Style tweaks, switch to scoped_array. #

Total comments: 2

Patch Set 7 : Int64 division retains accuracy, style fixes. #

Patch Set 8 : Added unit test ensuring accuracy with large times. Naming fix in unit tests. #

Patch Set 9 : Fixes for clang chromium-style-check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -25 lines) Patch
M ui/aura/aura.gyp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M ui/aura/gestures/gesture_point.h View 1 2 3 4 5 6 7 8 6 chunks +7 lines, -8 lines 0 comments Download
M ui/aura/gestures/gesture_point.cc View 1 2 3 4 5 6 7 8 6 chunks +19 lines, -13 lines 0 comments Download
M ui/aura/gestures/gesture_sequence.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/gestures/gesture_sequence.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
A ui/aura/gestures/velocity_calculator.h View 1 2 3 4 5 6 7 8 1 chunk +51 lines, -0 lines 0 comments Download
A ui/aura/gestures/velocity_calculator.cc View 1 2 3 4 5 6 7 8 1 chunk +109 lines, -0 lines 0 comments Download
A ui/aura/gestures/velocity_calculator_unittest.cc View 1 2 3 4 5 6 7 1 chunk +146 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
tdresser
8 years, 10 months ago (2012-02-02 15:42:59 UTC) #1
rjkroege
http://codereview.chromium.org/9310031/diff/2001/ui/aura/gestures/gesture_point.cc File ui/aura/gestures/gesture_point.cc (right): http://codereview.chromium.org/9310031/diff/2001/ui/aura/gestures/gesture_point.cc#newcode40 ui/aura/gestures/gesture_point.cc:40: const double event_timestamp_seconds = event.time_stamp().InSecondsF(); if our compiler is ...
8 years, 10 months ago (2012-02-02 15:58:36 UTC) #2
Ian Vollick
http://codereview.chromium.org/9310031/diff/2001/ui/aura/gestures/velocity_calculator.h File ui/aura/gestures/velocity_calculator.h (right): http://codereview.chromium.org/9310031/diff/2001/ui/aura/gestures/velocity_calculator.h#newcode19 ui/aura/gestures/velocity_calculator.h:19: void Velocity(float* x, float*y); Since we want to get ...
8 years, 10 months ago (2012-02-02 16:40:23 UTC) #3
tdresser
8 years, 10 months ago (2012-02-02 19:17:20 UTC) #4
rjkroege
LGTM http://codereview.chromium.org/9310031/diff/10/ui/aura/gestures/velocity_calculator.cc File ui/aura/gestures/velocity_calculator.cc (right): http://codereview.chromium.org/9310031/diff/10/ui/aura/gestures/velocity_calculator.cc#newcode57 ui/aura/gestures/velocity_calculator.cc:57: mean_x /= buffer_size_; compute the reciprocal once and ...
8 years, 10 months ago (2012-02-02 20:24:16 UTC) #5
sadrul
http://codereview.chromium.org/9310031/diff/10/ui/aura/gestures/velocity_calculator.cc File ui/aura/gestures/velocity_calculator.cc (right): http://codereview.chromium.org/9310031/diff/10/ui/aura/gestures/velocity_calculator.cc#newcode31 ui/aura/gestures/velocity_calculator.cc:31: UpdateVelocity(); I kind of liked the way you did ...
8 years, 10 months ago (2012-02-02 20:34:01 UTC) #6
tdresser
8 years, 10 months ago (2012-02-02 21:43:16 UTC) #7
sadrul
Looks good. Left some style nits. http://codereview.chromium.org/9310031/diff/12009/ui/aura/gestures/velocity_calculator.cc File ui/aura/gestures/velocity_calculator.cc (right): http://codereview.chromium.org/9310031/diff/12009/ui/aura/gestures/velocity_calculator.cc#newcode11 ui/aura/gestures/velocity_calculator.cc:11: , num_valid_entries_(0) Wha. ...
8 years, 10 months ago (2012-02-02 22:04:06 UTC) #8
tdresser
http://codereview.chromium.org/9310031/diff/12009/ui/aura/gestures/velocity_calculator.h File ui/aura/gestures/velocity_calculator.h (right): http://codereview.chromium.org/9310031/diff/12009/ui/aura/gestures/velocity_calculator.h#newcode15 ui/aura/gestures/velocity_calculator.h:15: class AURA_EXPORT VelocityCalculator { On 2012/02/02 22:04:06, sadrul wrote: ...
8 years, 10 months ago (2012-02-02 22:25:42 UTC) #9
sadrul
LGTM http://codereview.chromium.org/9310031/diff/12009/ui/aura/gestures/velocity_calculator.h File ui/aura/gestures/velocity_calculator.h (right): http://codereview.chromium.org/9310031/diff/12009/ui/aura/gestures/velocity_calculator.h#newcode15 ui/aura/gestures/velocity_calculator.h:15: class AURA_EXPORT VelocityCalculator { On 2012/02/02 22:25:42, tdresser ...
8 years, 10 months ago (2012-02-02 22:31:10 UTC) #10
Ian Vollick
http://codereview.chromium.org/9310031/diff/2004/ui/aura/gestures/velocity_calculator.cc File ui/aura/gestures/velocity_calculator.cc (right): http://codereview.chromium.org/9310031/diff/2004/ui/aura/gestures/velocity_calculator.cc#newcode76 ui/aura/gestures/velocity_calculator.cc:76: mean_time *= buffer_size_i; Will this not create a floating ...
8 years, 10 months ago (2012-02-02 23:31:10 UTC) #11
tdresser
8 years, 10 months ago (2012-02-03 14:08:07 UTC) #12
Ian Vollick
On 2012/02/03 14:08:07, tdresser wrote: Looks great! Might be nice if there was a unit ...
8 years, 10 months ago (2012-02-03 15:03:31 UTC) #13
tdresser
On 2012/02/03 15:03:31, vollick wrote: > On 2012/02/03 14:08:07, tdresser wrote: > > Looks great! ...
8 years, 10 months ago (2012-02-03 18:30:58 UTC) #14
tdresser
8 years, 10 months ago (2012-02-03 18:31:17 UTC) #15
tdresser
8 years, 10 months ago (2012-02-03 18:39:47 UTC) #16
Ian Vollick
On 2012/02/03 18:39:47, tdresser wrote: Nice. LGTM
8 years, 10 months ago (2012-02-03 18:40:27 UTC) #17
sky
Since others reviewed the gesture changes I only looked at the gyp change (yes). LGTM
8 years, 10 months ago (2012-02-03 21:40:32 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/9310031/3021
8 years, 10 months ago (2012-02-06 15:50:28 UTC) #19
commit-bot: I haz the power
Try job failure for 9310031-3021 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 10 months ago (2012-02-06 18:22:58 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/9310031/3021
8 years, 10 months ago (2012-02-06 20:13:45 UTC) #21
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
8 years, 10 months ago (2012-02-06 23:15:46 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/9310031/3021
8 years, 10 months ago (2012-02-07 16:14:26 UTC) #23
commit-bot: I haz the power
Change committed as 120835
8 years, 10 months ago (2012-02-07 22:07:09 UTC) #24
michaeln
hi, this failed to compile on clang so was reverted. Revert revision 120845 Here's the ...
8 years, 10 months ago (2012-02-07 22:41:06 UTC) #25
tdresser
8 years, 10 months ago (2012-02-08 15:33:22 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/9310031/36002
8 years, 10 months ago (2012-02-08 15:34:11 UTC) #27
commit-bot: I haz the power
8 years, 10 months ago (2012-02-08 16:00:03 UTC) #28
Try job failure for 9310031-36002 (retry) on win_rel for step "compile" (clobber
build).
It's a second try, previously, step "compile" failed.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...

Powered by Google App Engine
This is Rietveld 408576698