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

Issue 1991323002: Send input event IPCs directly from the UI thread (Closed)

Created:
4 years, 7 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, enne (OOO), jam, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, tdresser, viettrungluu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Send input event IPCs directly from the UI thread This CL: 1. Adds SendNow and SendOnIOThread to ChannelProxy 2a. SendNow sends immediately from the current thread if the underlying Channel implementation claims to have a thread-safe Send. 2b. SendOnIOThread is simply a more explicit alias for Send and and does not acknowledge the thread-safety of the underlying Channel implementation. 2. Flags ChannelMojo for thread-safe Send once again 3. Adds GetImmediateSender and GetIOThreadSender interfaces to RenderProcessHost. These are safe alternatives to using its IPC::Sender implementation directly and each corresponds to SendNow or SendOnIOThread behavior, respectively. 4. Changes RenderWidgetHostImpl so that the input router uses the RPH's immediate Sender interface. The net result here is that input events are now sent to renderers directly from the UI thread, and we have a reusable path forward for porting more IPCs to the SendNow interface. BUG=612944 TBR=jam@chromium.org Committed: https://crrev.com/868f89e764ab0e807adb237f0cbaf79ca5f49257 Cr-Commit-Position: refs/heads/master@{#395906}

Patch Set 1 : #

Total comments: 1

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Total comments: 3

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -91 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 chunks +15 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 9 chunks +69 lines, -40 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 1 chunk +9 lines, -1 line 0 comments Download
M ipc/ipc_channel_proxy.h View 1 2 3 4 5 4 chunks +19 lines, -4 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 2 3 4 5 4 chunks +40 lines, -35 lines 0 comments Download
M ipc/ipc_sync_channel.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_sync_channel.cc View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
M ipc/ipc_sync_message_filter.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M ipc/ipc_sync_message_filter.cc View 1 2 3 2 chunks +14 lines, -4 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 45 (17 generated)
Ken Rockot(use gerrit already)
Please take a look. Other options I rejected after prototyping them: - Adding more surface ...
4 years, 7 months ago (2016-05-19 21:39:45 UTC) #6
Charlie Reis
[+piman,kenrb] I haven't looked yet, but it looks like this is failing a lot of ...
4 years, 7 months ago (2016-05-20 00:11:42 UTC) #9
Ken Rockot(use gerrit already)
On 2016/05/20 at 00:11:42, creis wrote: > [+piman,kenrb] > > I haven't looked yet, but ...
4 years, 7 months ago (2016-05-20 00:16:03 UTC) #10
piman
On 2016/05/20 00:11:42, Charlie Reis (slow to reply) wrote: > [+piman,kenrb] > > I haven't ...
4 years, 7 months ago (2016-05-20 00:23:57 UTC) #11
piman
https://codereview.chromium.org/1991323002/diff/40001/ipc/ipc_channel_proxy.h File ipc/ipc_channel_proxy.h (right): https://codereview.chromium.org/1991323002/diff/40001/ipc/ipc_channel_proxy.h#newcode136 ipc/ipc_channel_proxy.h:136: bool SendNow(Message* message); drive-by: it would be nice to ...
4 years, 7 months ago (2016-05-20 00:35:41 UTC) #12
Ken Rockot(use gerrit already)
On 2016/05/20 at 00:35:41, piman wrote: > https://codereview.chromium.org/1991323002/diff/40001/ipc/ipc_channel_proxy.h > File ipc/ipc_channel_proxy.h (right): > > https://codereview.chromium.org/1991323002/diff/40001/ipc/ipc_channel_proxy.h#newcode136 ...
4 years, 7 months ago (2016-05-20 02:10:04 UTC) #13
Ken Rockot(use gerrit already)
On 2016/05/20 at 00:23:57, piman wrote: > On 2016/05/20 00:11:42, Charlie Reis (slow to reply) ...
4 years, 7 months ago (2016-05-20 02:17:20 UTC) #14
piman
+rbyers, do you have some thoughts about this? This means the input events are sent ...
4 years, 7 months ago (2016-05-20 02:45:01 UTC) #16
Rick Byers
On 2016/05/20 02:45:01, piman wrote: > +rbyers, do you have some thoughts about this? This ...
4 years, 7 months ago (2016-05-20 14:12:18 UTC) #19
kenrb
Don't all InputMsg_* messages already get thread hops in the renderer process to give the ...
4 years, 7 months ago (2016-05-20 14:21:12 UTC) #20
piman
On Fri, May 20, 2016 at 7:21 AM, <kenrb@chromium.org> wrote: > Don't all InputMsg_* messages ...
4 years, 7 months ago (2016-05-20 15:18:08 UTC) #21
Sami
+enne for any unified BeginFrame overlap. Is there a chance that with this patch input ...
4 years, 7 months ago (2016-05-23 17:24:47 UTC) #22
piman
On Mon, May 23, 2016 at 10:24 AM, skyostil@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote: > +enne ...
4 years, 7 months ago (2016-05-23 17:49:57 UTC) #23
Ken Rockot(use gerrit already)
On Mon, May 23, 2016 at 10:49 AM, Antoine Labour <piman@chromium.org> wrote: > > > ...
4 years, 7 months ago (2016-05-23 17:58:21 UTC) #24
piman
On Mon, May 23, 2016 at 10:58 AM, Ken Rockot <rockot@chromium.org> wrote: > On Mon, ...
4 years, 7 months ago (2016-05-23 18:06:40 UTC) #25
Charlie Reis
A lot of the details here are beyond me, but I appreciate the approach of ...
4 years, 7 months ago (2016-05-23 23:33:12 UTC) #26
Ken Rockot(use gerrit already)
On 2016/05/23 at 23:33:12, creis wrote: > A lot of the details here are beyond ...
4 years, 7 months ago (2016-05-24 01:35:26 UTC) #27
Sami
On 2016/05/23 18:06:40, piman wrote: > On Mon, May 23, 2016 at 10:58 AM, Ken ...
4 years, 7 months ago (2016-05-24 10:11:49 UTC) #28
piman
https://codereview.chromium.org/1991323002/diff/80001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1991323002/diff/80001/content/browser/renderer_host/render_process_host_impl.cc#newcode470 content/browser/renderer_host/render_process_host_impl.cc:470: } nit: this is not needed any more, I ...
4 years, 7 months ago (2016-05-24 17:24:51 UTC) #29
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1991323002/diff/80001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1991323002/diff/80001/content/browser/renderer_host/render_process_host_impl.cc#newcode470 content/browser/renderer_host/render_process_host_impl.cc:470: } On 2016/05/24 at 17:24:51, piman wrote: > nit: ...
4 years, 7 months ago (2016-05-24 18:00:08 UTC) #30
Charlie Reis
Thanks. content/ LGTM, with possibly one more bit of simplification. Please wait for piman's approval ...
4 years, 7 months ago (2016-05-24 18:11:56 UTC) #31
piman
lgtm https://codereview.chromium.org/1991323002/diff/100001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1991323002/diff/100001/content/browser/renderer_host/render_process_host_impl.cc#newcode487 content/browser/renderer_host/render_process_host_impl.cc:487: SenderProxy io_thread_sender_; On 2016/05/24 18:11:55, Charlie Reis wrote: ...
4 years, 7 months ago (2016-05-24 19:00:26 UTC) #32
Ken Rockot(use gerrit already)
Thanks all for the reviews and helpful feedback https://codereview.chromium.org/1991323002/diff/100001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1991323002/diff/100001/content/browser/renderer_host/render_process_host_impl.cc#newcode487 content/browser/renderer_host/render_process_host_impl.cc:487: SenderProxy ...
4 years, 7 months ago (2016-05-24 19:15:38 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991323002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1991323002/120001
4 years, 7 months ago (2016-05-24 19:16:38 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/75867)
4 years, 7 months ago (2016-05-24 22:03:50 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991323002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1991323002/160001
4 years, 7 months ago (2016-05-25 16:21:43 UTC) #42
commit-bot: I haz the power
Committed patchset #7 (id:160001)
4 years, 7 months ago (2016-05-25 16:26:00 UTC) #43
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 16:28:22 UTC) #45
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/868f89e764ab0e807adb237f0cbaf79ca5f49257
Cr-Commit-Position: refs/heads/master@{#395906}

Powered by Google App Engine
This is Rietveld 408576698