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

Issue 997283002: Coalesce async touch move events until the ack back from render (Closed)

Created:
5 years, 9 months ago by lanwei
Modified:
5 years, 7 months ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jdduke+watch_chromium.org, jam, mlamouri+watch-content_chromium.org, Rick Byers
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Coalesce async touch move events until the ack back from render. In order to avoid the touch event queue keep growing when render handles async touchmove events longer than 200ms, which is the async touchmove interval, we keep coalesce touch moves and send the next touchmove until passing the async touchmove interval and receive the ACK from render. BUG=448760 Committed: https://crrev.com/f1a2283b2d64a09d0d0a6a4468eccf30805b069d Cr-Commit-Position: refs/heads/master@{#330548}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add an ack type for async touch move #

Total comments: 16

Patch Set 3 : rename variable #

Patch Set 4 : update count #

Patch Set 5 : Unit tests #

Total comments: 22

Patch Set 6 : Made changes based on comments #

Total comments: 21

Patch Set 7 : #

Total comments: 19

Patch Set 8 : #

Total comments: 11

Patch Set 9 : #

Total comments: 12

Patch Set 10 : #

Total comments: 22

Patch Set 11 : #

Patch Set 12 : Use queue to store the IDs for sent async touchmove #

Total comments: 6

Patch Set 13 : Ack struct and unittest #

Total comments: 37

Patch Set 14 : Fixing unittests #

Total comments: 16

Patch Set 15 : #

Total comments: 17

Patch Set 16 : Change the unittests #

Total comments: 1

Patch Set 17 : Modify unittest #

Total comments: 4

Patch Set 18 : Format input_message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+856 lines, -335 lines) Patch
M content/browser/renderer_host/input/input_router_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +5 lines, -4 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +31 lines, -40 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -4 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 33 chunks +133 lines, -94 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +25 lines, -5 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +63 lines, -15 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 26 chunks +397 lines, -94 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 15 chunks +51 lines, -30 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +6 lines, -9 lines 0 comments Download
A content/common/input/input_event_ack.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +45 lines, -0 lines 0 comments Download
A content/common/input/input_event_ack.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +48 lines, -0 lines 0 comments Download
M content/common/input/synthetic_web_input_event_builders.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/common/input/web_input_event_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -1 line 0 comments Download
M content/common/input/web_input_event_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +14 lines, -9 lines 0 comments Download
M content/common/input_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +9 lines, -8 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -6 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -8 lines 0 comments Download
M ui/events/event.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 61 (19 generated)
lanwei
5 years, 9 months ago (2015-03-11 22:17:48 UTC) #2
lanwei
5 years, 9 months ago (2015-03-11 22:19:33 UTC) #3
jdduke (slow)
Thanks Lan! https://codereview.chromium.org/997283002/diff/1/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/1/content/browser/renderer_host/input/input_router_impl.cc#newcode428 content/browser/renderer_host/input/input_router_impl.cc:428: if (ack.type == WebInputEvent::TouchMove && This seems ...
5 years, 9 months ago (2015-03-11 22:37:11 UTC) #4
lanwei
Could you please take a first look at this, meanwhile I am fixing and writing ...
5 years, 9 months ago (2015-03-23 18:27:44 UTC) #6
tdresser
This is preliminary, I haven't taken a particularly close look yet. https://codereview.chromium.org/997283002/diff/40001/content/browser/renderer_host/input/input_router_impl.h File content/browser/renderer_host/input/input_router_impl.h (right): ...
5 years, 9 months ago (2015-03-23 19:21:44 UTC) #7
lanwei
https://codereview.chromium.org/997283002/diff/40001/content/browser/renderer_host/input/input_router_impl.h File content/browser/renderer_host/input/input_router_impl.h (right): https://codereview.chromium.org/997283002/diff/40001/content/browser/renderer_host/input/input_router_impl.h#newcode22 content/browser/renderer_host/input/input_router_impl.h:22: struct InputHostMsg_HandleAsyncTouchEvent_ACK_Params; On 2015/03/23 19:21:44, tdresser wrote: > This ...
5 years, 9 months ago (2015-03-24 18:46:38 UTC) #9
tdresser
On 2015/03/24 18:46:38, lanwei wrote: > https://codereview.chromium.org/997283002/diff/40001/content/browser/renderer_host/input/input_router_impl.h > File content/browser/renderer_host/input/input_router_impl.h (right): > > https://codereview.chromium.org/997283002/diff/40001/content/browser/renderer_host/input/input_router_impl.h#newcode22 > ...
5 years, 9 months ago (2015-03-24 19:37:14 UTC) #13
lanwei
5 years, 9 months ago (2015-03-25 02:51:58 UTC) #14
tdresser
https://codereview.chromium.org/997283002/diff/140001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/997283002/diff/140001/content/browser/renderer_host/input/touch_event_queue.cc#newcode391 content/browser/renderer_host/input/touch_event_queue.cc:391: TRACE_EVENT0("input", "TouchEventQueue::QueueEvent"); Might as well leave that whitespace there. ...
5 years, 9 months ago (2015-03-25 14:16:19 UTC) #15
lanwei
https://codereview.chromium.org/997283002/diff/140001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/997283002/diff/140001/content/browser/renderer_host/input/touch_event_queue.cc#newcode391 content/browser/renderer_host/input/touch_event_queue.cc:391: TRACE_EVENT0("input", "TouchEventQueue::QueueEvent"); On 2015/03/25 14:16:18, tdresser wrote: > Might ...
5 years, 9 months ago (2015-03-26 11:54:38 UTC) #17
tdresser
https://codereview.chromium.org/997283002/diff/180001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/180001/content/browser/renderer_host/input/input_router_impl.cc#newcode362 content/browser/renderer_host/input/input_router_impl.cc:362: // If we don't care about the ack disposition, ...
5 years, 9 months ago (2015-03-26 15:25:29 UTC) #18
lanwei
https://codereview.chromium.org/997283002/diff/180001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/180001/content/browser/renderer_host/input/input_router_impl.cc#newcode362 content/browser/renderer_host/input/input_router_impl.cc:362: // If we don't care about the ack disposition, ...
5 years, 9 months ago (2015-03-27 04:39:42 UTC) #19
tdresser
https://codereview.chromium.org/997283002/diff/200001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/200001/content/browser/renderer_host/input/input_router_impl.cc#newcode446 content/browser/renderer_host/input/input_router_impl.cc:446: Source<void>(this), Details<int>(&type)); As far as I can tell, this ...
5 years, 9 months ago (2015-03-27 13:34:44 UTC) #20
jdduke (slow)
https://codereview.chromium.org/997283002/diff/200001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/200001/content/browser/renderer_host/input/input_router_impl.cc#newcode446 content/browser/renderer_host/input/input_router_impl.cc:446: Source<void>(this), Details<int>(&type)); On 2015/03/27 13:34:44, tdresser wrote: > As ...
5 years, 8 months ago (2015-03-30 18:04:15 UTC) #21
lanwei
https://codereview.chromium.org/997283002/diff/200001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/200001/content/browser/renderer_host/input/input_router_impl.cc#newcode446 content/browser/renderer_host/input/input_router_impl.cc:446: Source<void>(this), Details<int>(&type)); On 2015/03/27 13:34:44, tdresser wrote: > As ...
5 years, 8 months ago (2015-03-31 13:07:50 UTC) #22
tdresser
https://codereview.chromium.org/997283002/diff/220001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/997283002/diff/220001/content/browser/renderer_host/input/touch_event_queue.cc#newcode460 content/browser/renderer_host/input/touch_event_queue.cc:460: touch.event.cancelable = !send_touch_events_async_; send_touch_events_async_ should never be false here, ...
5 years, 8 months ago (2015-03-31 14:44:07 UTC) #23
lanwei
https://codereview.chromium.org/997283002/diff/220001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/997283002/diff/220001/content/browser/renderer_host/input/touch_event_queue.cc#newcode460 content/browser/renderer_host/input/touch_event_queue.cc:460: touch.event.cancelable = !send_touch_events_async_; On 2015/03/31 14:44:07, tdresser wrote: > ...
5 years, 8 months ago (2015-04-01 13:14:21 UTC) #24
tdresser
LGTM, with the addition of one more test. Make sure to get an LGTM from ...
5 years, 8 months ago (2015-04-01 13:29:03 UTC) #25
jdduke (slow)
https://codereview.chromium.org/997283002/diff/240001/content/browser/renderer_host/input/input_router_impl.h File content/browser/renderer_host/input/input_router_impl.h (right): https://codereview.chromium.org/997283002/diff/240001/content/browser/renderer_host/input/input_router_impl.h#newcode22 content/browser/renderer_host/input/input_router_impl.h:22: struct InputHostMsg_HandleUncancelableTouchMoveEvent_ACK_Params; Nit: This forward decl is no longer ...
5 years, 8 months ago (2015-04-02 19:36:01 UTC) #26
lanwei
https://codereview.chromium.org/997283002/diff/240001/content/browser/renderer_host/input/input_router_impl.h File content/browser/renderer_host/input/input_router_impl.h (right): https://codereview.chromium.org/997283002/diff/240001/content/browser/renderer_host/input/input_router_impl.h#newcode22 content/browser/renderer_host/input/input_router_impl.h:22: struct InputHostMsg_HandleUncancelableTouchMoveEvent_ACK_Params; On 2015/04/02 19:36:00, jdduke wrote: > Nit: ...
5 years, 8 months ago (2015-04-14 20:55:34 UTC) #29
jdduke (slow)
I think we're getting close, thanks for sticking with this. https://codereview.chromium.org/997283002/diff/320001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/320001/content/browser/renderer_host/input/input_router_impl.cc#newcode361 ...
5 years, 8 months ago (2015-04-15 17:14:53 UTC) #31
lanwei
https://codereview.chromium.org/997283002/diff/320001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/320001/content/browser/renderer_host/input/input_router_impl.cc#newcode361 content/browser/renderer_host/input/input_router_impl.cc:361: bool ignores_ack = On 2015/04/15 17:14:53, jdduke wrote: > ...
5 years, 8 months ago (2015-04-17 20:49:00 UTC) #32
jdduke (slow)
I think the last high level point I have is regarding the other change you're ...
5 years, 8 months ago (2015-04-17 22:13:18 UTC) #33
lanwei
5 years, 7 months ago (2015-05-01 17:50:39 UTC) #35
jdduke (slow)
https://codereview.chromium.org/997283002/diff/380001/content/browser/renderer_host/input/input_router_impl.h File content/browser/renderer_host/input/input_router_impl.h (right): https://codereview.chromium.org/997283002/diff/380001/content/browser/renderer_host/input/input_router_impl.h#newcode145 content/browser/renderer_host/input/input_router_impl.h:145: void ProcessInputEventAck(blink::WebInputEvent::Type event_type, What if we add a struct ...
5 years, 7 months ago (2015-05-01 19:11:09 UTC) #36
lanwei
https://codereview.chromium.org/997283002/diff/380001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/997283002/diff/380001/content/browser/renderer_host/input/touch_event_queue.cc#newcode461 content/browser/renderer_host/input/touch_event_queue.cc:461: if (touch_queue_.front()->coalesced_event().event.uniqueTouchEventId != On 2015/05/01 19:11:09, jdduke wrote: > ...
5 years, 7 months ago (2015-05-07 04:11:37 UTC) #38
jdduke (slow)
https://codereview.chromium.org/997283002/diff/440001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (left): https://codereview.chromium.org/997283002/diff/440001/content/browser/renderer_host/input/input_router_impl.cc#oldcode506 content/browser/renderer_host/input/input_router_impl.cc:506: WebInputEvent::Type event_type, For now let's keep this signature (adding ...
5 years, 7 months ago (2015-05-07 21:11:16 UTC) #39
jdduke (slow)
https://codereview.chromium.org/997283002/diff/440001/content/common/input/input_event_ack.h File content/common/input/input_event_ack.h (right): https://codereview.chromium.org/997283002/diff/440001/content/common/input/input_event_ack.h#newcode20 content/common/input/input_event_ack.h:20: InputEventAck(blink::WebInputEvent::Type type, Dang, looks like we'll need to align ...
5 years, 7 months ago (2015-05-07 21:38:05 UTC) #40
jdduke (slow)
https://codereview.chromium.org/997283002/diff/440001/content/common/input/input_event_ack.h File content/common/input/input_event_ack.h (right): https://codereview.chromium.org/997283002/diff/440001/content/common/input/input_event_ack.h#newcode20 content/common/input/input_event_ack.h:20: InputEventAck(blink::WebInputEvent::Type type, On 2015/05/07 21:38:05, jdduke wrote: > Dang, ...
5 years, 7 months ago (2015-05-08 16:00:15 UTC) #42
lanwei
https://codereview.chromium.org/997283002/diff/440001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (left): https://codereview.chromium.org/997283002/diff/440001/content/browser/renderer_host/input/input_router_impl.cc#oldcode506 content/browser/renderer_host/input/input_router_impl.cc:506: WebInputEvent::Type event_type, On 2015/05/07 21:11:15, jdduke wrote: > For ...
5 years, 7 months ago (2015-05-08 19:31:26 UTC) #43
jdduke (slow)
A few more nits, almost there I think. https://codereview.chromium.org/997283002/diff/460001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/460001/content/browser/renderer_host/input/input_router_impl.cc#newcode370 content/browser/renderer_host/input/input_router_impl.cc:370: if ...
5 years, 7 months ago (2015-05-08 21:30:49 UTC) #44
lanwei
https://codereview.chromium.org/997283002/diff/460001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/997283002/diff/460001/content/browser/renderer_host/input/input_router_impl.cc#newcode370 content/browser/renderer_host/input/input_router_impl.cc:370: if (!needs_synthetic_ack) { On 2015/05/08 21:30:48, jdduke wrote: > ...
5 years, 7 months ago (2015-05-11 19:27:56 UTC) #47
jdduke (slow)
The core logic looks good, now just some nits and suggestion on the touch id ...
5 years, 7 months ago (2015-05-12 16:07:12 UTC) #48
lanwei
https://codereview.chromium.org/997283002/diff/520001/content/browser/renderer_host/input/input_router_impl.h File content/browser/renderer_host/input/input_router_impl.h (right): https://codereview.chromium.org/997283002/diff/520001/content/browser/renderer_host/input/input_router_impl.h#newcode34 content/browser/renderer_host/input/input_router_impl.h:34: struct InputEventAck; On 2015/05/12 16:07:11, jdduke wrote: > Nit: ...
5 years, 7 months ago (2015-05-13 21:01:54 UTC) #50
jdduke (slow)
lgtm https://codereview.chromium.org/997283002/diff/560001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/997283002/diff/560001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode483 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:483: SendTouchEventACK(get<0>(params)->type, ack_result, event_id); Since we're already extracting the ...
5 years, 7 months ago (2015-05-14 21:00:06 UTC) #51
lanwei
sadrul@chromium.org: Please review changes in Could you please take a look at ui/events/event.h? nasko@chromium.org: Please ...
5 years, 7 months ago (2015-05-15 03:01:53 UTC) #53
nasko
Some formatting comments for the IPC changes. Once fixed, LGTM. https://codereview.chromium.org/997283002/diff/580001/content/common/input_messages.h File content/common/input_messages.h (right): https://codereview.chromium.org/997283002/diff/580001/content/common/input_messages.h#newcode111 ...
5 years, 7 months ago (2015-05-18 17:20:07 UTC) #54
sadrul
On 2015/05/15 03:01:53, lanwei wrote: > mailto:sadrul@chromium.org: Please review changes in > > Could you ...
5 years, 7 months ago (2015-05-18 19:52:35 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/997283002/600001
5 years, 7 months ago (2015-05-19 15:30:14 UTC) #58
commit-bot: I haz the power
Committed patchset #18 (id:600001)
5 years, 7 months ago (2015-05-19 17:24:29 UTC) #59
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/f1a2283b2d64a09d0d0a6a4468eccf30805b069d Cr-Commit-Position: refs/heads/master@{#330548}
5 years, 7 months ago (2015-05-19 17:25:29 UTC) #60
lanwei
5 years, 7 months ago (2015-05-19 21:32:08 UTC) #61
Message was sent while issue was closed.
https://codereview.chromium.org/997283002/diff/580001/content/common/input_me...
File content/common/input_messages.h (right):

https://codereview.chromium.org/997283002/diff/580001/content/common/input_me...
content/common/input_messages.h:111: IPC_STRUCT_TRAITS_MEMBER(type)
On 2015/05/18 17:20:07, nasko wrote:
> Please indent struct members to match existing style in the file.

Done.

https://codereview.chromium.org/997283002/diff/580001/content/common/input_me...
content/common/input_messages.h:242:
IPC_MESSAGE_ROUTED1(InputHostMsg_HandleInputEvent_ACK, content::InputEventAck)
On 2015/05/18 17:20:07, nasko wrote:
> nit: Parameter name should follow in /* */ comment.

Done.

Powered by Google App Engine
This is Rietveld 408576698