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

Issue 12225056: Coalesce scrollUpdate and pinchUpdate on gesture_event queue (Closed)

Created:
7 years, 10 months ago by Yusuf
Modified:
7 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, sadrul, klobag.chromium
Visibility:
Public.

Description

Coalesce scrollUpdate and pinchUpdate on gesture_event queue Currently we are just coalescing scrollUpdates and we end up not utilizing this when we have interleaved scrollUpdate and pinchUpdates. This change makes that possible and makes sure the gesture_event_queue doesnt get flooded with interleaved scroll and pinch updates. BUG=174189 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=182205

Patch Set 1 #

Total comments: 9

Patch Set 2 : Made loop clearer and fixed transform for pinch #

Patch Set 3 : Renaming local variables for clarity #

Total comments: 5

Patch Set 4 : Added test and got rid of loop #

Total comments: 6

Patch Set 5 : Styling fixes and added anchor related expectations and fixed numerical error #

Patch Set 6 : Fixed crash on processGestureAck on win trybots #

Patch Set 7 : Rebased #

Patch Set 8 : Fixed crash on win trybot #

Patch Set 9 : Fix build error #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -27 lines) Patch
M content/browser/renderer_host/gesture_event_filter.h View 1 2 3 4 chunks +24 lines, -2 lines 0 comments Download
M content/browser/renderer_host/gesture_event_filter.cc View 1 2 3 4 5 6 7 8 6 chunks +102 lines, -19 lines 3 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 5 chunks +259 lines, -6 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Yusuf
This still needs some cleanup(I am doing something wrong with timeStamps and although this doesn't ...
7 years, 10 months ago (2013-02-06 20:35:11 UTC) #1
rjkroege
https://codereview.chromium.org/12225056/diff/1/content/browser/renderer_host/gesture_event_filter.cc File content/browser/renderer_host/gesture_event_filter.cc (right): https://codereview.chromium.org/12225056/diff/1/content/browser/renderer_host/gesture_event_filter.cc#newcode283 content/browser/renderer_host/gesture_event_filter.cc:283: GestureEventQueue::reverse_iterator gesture_it; if we have coalesced... we should only ...
7 years, 10 months ago (2013-02-06 22:16:34 UTC) #2
Yusuf
https://codereview.chromium.org/12225056/diff/1/content/browser/renderer_host/gesture_event_filter.cc File content/browser/renderer_host/gesture_event_filter.cc (right): https://codereview.chromium.org/12225056/diff/1/content/browser/renderer_host/gesture_event_filter.cc#newcode302 content/browser/renderer_host/gesture_event_filter.cc:302: combined_transform.PreconcatTransform(GetTransformForEvent(*gesture_it)); I guess I don't know enough about how ...
7 years, 10 months ago (2013-02-06 22:34:09 UTC) #3
Yusuf
tests to follow. https://codereview.chromium.org/12225056/diff/1/content/browser/renderer_host/gesture_event_filter.cc File content/browser/renderer_host/gesture_event_filter.cc (right): https://codereview.chromium.org/12225056/diff/1/content/browser/renderer_host/gesture_event_filter.cc#newcode283 content/browser/renderer_host/gesture_event_filter.cc:283: GestureEventQueue::reverse_iterator gesture_it; Done. Well, I kept ...
7 years, 10 months ago (2013-02-07 00:56:45 UTC) #4
rjkroege
looks largely good minus the absence of tests. https://codereview.chromium.org/12225056/diff/8001/content/browser/renderer_host/gesture_event_filter.cc File content/browser/renderer_host/gesture_event_filter.cc (right): https://codereview.chromium.org/12225056/diff/8001/content/browser/renderer_host/gesture_event_filter.cc#newcode192 content/browser/renderer_host/gesture_event_filter.cc:192: VLOG(0)<<"ANCHOR ...
7 years, 10 months ago (2013-02-11 20:02:12 UTC) #5
Yusuf
Added tests. Got rid of the loop. Corrected combined scroll so that we anchor to ...
7 years, 10 months ago (2013-02-12 18:44:28 UTC) #6
rjkroege
nice looking tests. https://codereview.chromium.org/12225056/diff/5003/content/browser/renderer_host/gesture_event_filter.cc File content/browser/renderer_host/gesture_event_filter.cc (right): https://codereview.chromium.org/12225056/diff/5003/content/browser/renderer_host/gesture_event_filter.cc#newcode229 content/browser/renderer_host/gesture_event_filter.cc:229: GestureEventQueue::iterator it_front = coalesced_gesture_events_.begin(); you could ...
7 years, 10 months ago (2013-02-12 19:33:16 UTC) #7
Yusuf
PTAL https://codereview.chromium.org/12225056/diff/5003/content/browser/renderer_host/gesture_event_filter.cc File content/browser/renderer_host/gesture_event_filter.cc (right): https://codereview.chromium.org/12225056/diff/5003/content/browser/renderer_host/gesture_event_filter.cc#newcode229 content/browser/renderer_host/gesture_event_filter.cc:229: GestureEventQueue::iterator it_front = coalesced_gesture_events_.begin(); On 2013/02/12 19:33:16, rjkroege ...
7 years, 10 months ago (2013-02-12 21:33:11 UTC) #8
rjkroege
lgtm
7 years, 10 months ago (2013-02-12 21:37:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/12225056/12002
7 years, 10 months ago (2013-02-12 21:56:50 UTC) #10
commit-bot: I haz the power
Failed to trigger a try job on android_dbg HTTP Error 400: Bad Request
7 years, 10 months ago (2013-02-13 00:12:28 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/12225056/7005
7 years, 10 months ago (2013-02-13 00:12:39 UTC) #12
commit-bot: I haz the power
Failed to trigger a try job on ios_rel_device HTTP Error 400: Bad Request
7 years, 10 months ago (2013-02-13 00:25:27 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/12225056/11004
7 years, 10 months ago (2013-02-13 00:25:46 UTC) #14
commit-bot: I haz the power
Failed to trigger a try job on win_rel HTTP Error 400: Bad Request
7 years, 10 months ago (2013-02-13 02:33:19 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/12225056/9009
7 years, 10 months ago (2013-02-13 02:33:44 UTC) #16
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-02-13 03:02:21 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/12225056/2013
7 years, 10 months ago (2013-02-13 03:02:44 UTC) #18
commit-bot: I haz the power
Change committed as 182205
7 years, 10 months ago (2013-02-13 13:14:58 UTC) #19
wjmaclean
7 years, 10 months ago (2013-02-22 19:57:28 UTC) #20
Message was sent while issue was closed.
Transforms seem sane at an initial glance. post-LGTM

https://codereview.chromium.org/12225056/diff/2013/content/browser/renderer_h...
File content/browser/renderer_host/gesture_event_filter.cc (right):

https://codereview.chromium.org/12225056/diff/2013/content/browser/renderer_h...
content/browser/renderer_host/gesture_event_filter.cc:232: // TODO(yusufo):
Introduce GesturePanScroll so that these can be combined
How is GesturePanScroll different from ordinary scroll?

https://codereview.chromium.org/12225056/diff/2013/content/browser/renderer_h...
content/browser/renderer_host/gesture_event_filter.cc:344: float combined_scale
= combined_scroll_pinch_.matrix().getDouble(0, 0);
Can you include some comments showing these computations in matrix notation?
It's very difficult to confirm correctness of the transforms when they're in
this form. In particular, making sure the subsequent translations get the
correct scale applied.

https://codereview.chromium.org/12225056/diff/2013/content/browser/renderer_h...
content/browser/renderer_host/gesture_event_filter.cc:375:
gesture_transform.Translate(-gesture_event.x, -gesture_event.y);
Generally, looks OK.

Powered by Google App Engine
This is Rietveld 408576698