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

Issue 2765583002: Teach main thread event queue about closures. (Closed)

Created:
3 years, 9 months ago by dtapuska
Modified:
3 years, 8 months ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, dtapuska+chromiumwatch_chromium.org, mlamouri+watch-content_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Teach main thread event queue about closures. This allows the rAF signal to execute all pending input right away instead of waiting for a message pump to process any input IPCs. This simplifies the state that we don't need to execute a post task for every event we have to process. At delivery time we can just take them all from the queue (except for the rAF aligned events) and execute them. BUG=674301 TBR=creis@chromium.org Review-Url: https://codereview.chromium.org/2765583002 Cr-Commit-Position: refs/heads/master@{#461133} Committed: https://chromium.googlesource.com/chromium/src/+/8ba8d7142ef4449775d3d75b6f17b80d24d07f77

Patch Set 1 #

Total comments: 27

Patch Set 2 : Rebase #

Patch Set 3 : Rename WebInputEventQueue so that it is cleaner #

Patch Set 4 : Fix build #

Total comments: 12

Patch Set 5 : Fix render frames using a different main thread event queue than render views #

Patch Set 6 : Rebase #

Patch Set 7 : Fix Mac issue #

Total comments: 6

Patch Set 8 : Address comments #

Total comments: 9

Patch Set 9 : Add comments #

Total comments: 8

Patch Set 10 : Remove two virtuals #

Total comments: 1

Patch Set 11 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+819 lines, -376 lines) Patch
M content/common/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/common/input/web_input_event_queue.h View 1 2 1 chunk +0 lines, -64 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/input/input_event_filter.h View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -2 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +54 lines, -11 lines 0 comments Download
M content/renderer/input/input_handler_manager.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/input/input_handler_manager.cc View 1 2 3 4 5 6 7 8 9 2 chunks +31 lines, -0 lines 0 comments Download
M content/renderer/input/input_handler_manager_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.h View 1 2 6 chunks +13 lines, -52 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.cc View 1 2 3 4 5 6 7 8 9 9 chunks +254 lines, -150 lines 0 comments Download
A content/renderer/input/main_thread_event_queue_task.h View 1 2 3 4 5 6 7 8 9 1 chunk +46 lines, -0 lines 0 comments Download
A content/renderer/input/main_thread_event_queue_task_list.h View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
A content/renderer/input/main_thread_event_queue_task_list.cc View 1 2 3 4 5 6 7 8 9 1 chunk +39 lines, -0 lines 0 comments Download
M content/renderer/input/main_thread_event_queue_unittest.cc View 1 2 3 4 5 6 7 25 chunks +292 lines, -95 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 63 (43 generated)
dtapuska
3 years, 9 months ago (2017-03-20 20:18:09 UTC) #4
dtapuska
On 2017/03/20 20:18:09, dtapuska wrote: ping
3 years, 9 months ago (2017-03-23 14:28:06 UTC) #8
mustaq
I will take another look at the dispatch-to-main code. I will sent my current comments ...
3 years, 9 months ago (2017-03-24 15:31:19 UTC) #9
dtapuska
https://codereview.chromium.org/2765583002/diff/1/content/common/input/web_input_event_queue.h File content/common/input/web_input_event_queue.h (right): https://codereview.chromium.org/2765583002/diff/1/content/common/input/web_input_event_queue.h#newcode5 content/common/input/web_input_event_queue.h:5: #ifndef CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_QUEUE_H_ On 2017/03/24 15:31:18, mustaq wrote: > Should ...
3 years, 9 months ago (2017-03-24 20:16:38 UTC) #12
mustaq
Thanks for clarifying the class names, it's very clean now. Few more comments, feel free ...
3 years, 9 months ago (2017-03-27 15:54:31 UTC) #19
dtapuska
https://codereview.chromium.org/2765583002/diff/60001/content/renderer/input/main_thread_event_queue.cc File content/renderer/input/main_thread_event_queue.cc (right): https://codereview.chromium.org/2765583002/diff/60001/content/renderer/input/main_thread_event_queue.cc#newcode78 content/renderer/input/main_thread_event_queue.cc:78: const QueuedWebInputEvent& other_event = On 2017/03/27 15:54:30, mustaq wrote: ...
3 years, 8 months ago (2017-03-28 20:19:01 UTC) #30
mustaq
LGTM with a request to add few more test sequences... https://codereview.chromium.org/2765583002/diff/120001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/120001/content/renderer/input/input_event_filter.cc#newcode116 ...
3 years, 8 months ago (2017-03-29 14:47:07 UTC) #33
dtapuska
https://codereview.chromium.org/2765583002/diff/120001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/120001/content/renderer/input/input_event_filter.cc#newcode116 content/renderer/input/input_event_filter.cc:116: main_task_runner_->PostTask(FROM_HERE, closure); On 2017/03/29 14:47:07, mustaq wrote: > Does ...
3 years, 8 months ago (2017-03-29 20:08:14 UTC) #35
dtapuska
On 2017/03/29 20:08:14, dtapuska wrote: > https://codereview.chromium.org/2765583002/diff/120001/content/renderer/input/input_event_filter.cc > File content/renderer/input/input_event_filter.cc (right): > > https://codereview.chromium.org/2765583002/diff/120001/content/renderer/input/input_event_filter.cc#newcode116 > ...
3 years, 8 months ago (2017-03-29 20:08:55 UTC) #37
mustaq
Still LGTM, thanks.
3 years, 8 months ago (2017-03-30 14:10:11 UTC) #41
tdresser
A few preliminary questions, as I'm not completely following this. https://codereview.chromium.org/2765583002/diff/140001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/140001/content/renderer/input/input_event_filter.cc#newcode117 ...
3 years, 8 months ago (2017-03-30 14:20:50 UTC) #42
dtapuska
https://codereview.chromium.org/2765583002/diff/140001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/140001/content/renderer/input/input_event_filter.cc#newcode117 content/renderer/input/input_event_filter.cc:117: // For some reason we de didn't find an ...
3 years, 8 months ago (2017-03-30 15:40:20 UTC) #43
tdresser
LGTM with nits (and a question). https://codereview.chromium.org/2765583002/diff/160001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/160001/content/renderer/input/input_event_filter.cc#newcode215 content/renderer/input/input_event_filter.cc:215: // unncessary as ...
3 years, 8 months ago (2017-03-30 17:46:16 UTC) #44
dtapuska
https://codereview.chromium.org/2765583002/diff/160001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/160001/content/renderer/input/input_event_filter.cc#newcode215 content/renderer/input/input_event_filter.cc:215: // unncessary as this would break for mojo which ...
3 years, 8 months ago (2017-03-30 19:45:51 UTC) #45
tdresser
Nice improvement with event coalescing. https://codereview.chromium.org/2765583002/diff/180001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (right): https://codereview.chromium.org/2765583002/diff/180001/content/renderer/input/input_event_filter.cc#newcode213 content/renderer/input/input_event_filter.cc:213: // TODO(dtapuska): Input mesages ...
3 years, 8 months ago (2017-03-30 19:51:33 UTC) #48
dtapuska
creis@chromium.org: Please review changes in */BUILD.gn
3 years, 8 months ago (2017-03-31 13:38:35 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2765583002/200001
3 years, 8 months ago (2017-03-31 15:45:36 UTC) #58
dtapuska
On 2017/03/31 13:38:35, dtapuska wrote: > mailto:creis@chromium.org: Please review changes in > > */BUILD.gn TBR ...
3 years, 8 months ago (2017-03-31 15:45:57 UTC) #59
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/chromium/src/+/8ba8d7142ef4449775d3d75b6f17b80d24d07f77
3 years, 8 months ago (2017-03-31 15:52:26 UTC) #62
Charlie Reis
3 years, 8 months ago (2017-03-31 23:54:33 UTC) #63
Message was sent while issue was closed.
RS LGTM for build files.

Powered by Google App Engine
This is Rietveld 408576698