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

Issue 1546001: Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UI... (Closed)

Created:
10 years, 9 months ago by Ken Russell (switch to Gerrit)
Modified:
9 years, 7 months ago
Reviewers:
brettw, jam
CC:
chromium-reviews, jam+cc_chromium.org, fbarchard, ben+cc_chromium.org, Alpha Left Google, apatrick_chromium, darin-cc_chromium.org, awong, brettw-cc_chromium.org, scherkus (not reviewing), greggman, darin (slow to review)
Visibility:
Public.

Description

Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UI thread, and GpuProcessHost, which now runs on the IO thread and derives from ChildProcessHost. This split was necessary in order to service synchronous messages from the renderer process. Moved message handlers for GPU messages from renderer to browser from BrowserRenderProcessHost to ResourceMessageFilter. Stopped sending multiple ViewHostMsg_EstablishGpuChannel messages from the same renderer if the connection was already established. Resetting the channel was causing failures in Send, and every other page reload containing WebGL content to fail. This cleanup will allow further simplification in the GPU process, but this is being left for a subsequent CL. Fixed bug in sandboxing of GPU process. Fixed latent bugs in cleanup code in GpuChannel and GpuChannelHost. Fixed crashes in ChildProcessHost if resource_dispatcher_host_ was NULL. Fixed apparent latent race conditions in creation of BackingStoreProxy and VideoLayerProxy. With these changes, WebGL content is running in the sandbox on both Mac and Windows. Linux support will be added in a following CL. BUG=29120 TEST=ran WebGL demos on Mac and Windows Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=43029

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 16

Patch Set 3 : '' #

Total comments: 6

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -240 lines) Patch
M chrome/browser/child_process_host.cc View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/gpu_process_host.h View 1 2 3 1 chunk +45 lines, -56 lines 0 comments Download
M chrome/browser/gpu_process_host.cc View 1 2 3 4 chunks +106 lines, -109 lines 0 comments Download
A chrome/browser/gpu_process_host_ui_shim.h View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/gpu_process_host_ui_shim.cc View 1 2 3 1 chunk +69 lines, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/backing_store_proxy.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/backing_store_proxy.cc View 1 2 3 4 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.h View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 2 chunks +0 lines, -12 lines 0 comments Download
M chrome/browser/renderer_host/gpu_view_host.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/gpu_view_host.cc View 1 2 3 1 chunk +21 lines, -17 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 3 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/video_layer_proxy.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/video_layer_proxy.cc View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/gpu_messages_internal.h View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/common/sandbox_policy.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/gpu/gpu_channel.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/gpu/gpu_thread.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/gpu/gpu_thread.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/gpu_channel_host.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/render_thread.cc View 1 2 3 2 chunks +14 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Ken Russell (switch to Gerrit)
Please review. Thanks.
10 years, 9 months ago (2010-03-29 03:26:52 UTC) #1
jam
http://codereview.chromium.org/1546001/diff/23001/5004 File chrome/browser/child_process_host.cc (right): http://codereview.chromium.org/1546001/diff/23001/5004#newcode83 chrome/browser/child_process_host.cc:83: if (resource_dispatcher_host_) { did you see this actually being ...
10 years, 9 months ago (2010-03-29 06:30:54 UTC) #2
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/1546001/diff/23001/5004 File chrome/browser/child_process_host.cc (right): http://codereview.chromium.org/1546001/diff/23001/5004#newcode83 chrome/browser/child_process_host.cc:83: if (resource_dispatcher_host_) { On 2010/03/29 06:30:55, John Abd-El-Malek wrote: ...
10 years, 9 months ago (2010-03-29 18:14:24 UTC) #3
jam
lgtm
10 years, 9 months ago (2010-03-29 18:29:08 UTC) #4
Ken Russell (switch to Gerrit)
FYI: tested --enable-gpu-rendering on Linux with this patch; working fine.
10 years, 9 months ago (2010-03-29 19:43:36 UTC) #5
brettw
LGTM, this is nicer. Just a few minor style nits. http://codereview.chromium.org/1546001/diff/39001/40003 File chrome/browser/child_process_host.cc (right): http://codereview.chromium.org/1546001/diff/39001/40003#newcode83 ...
10 years, 9 months ago (2010-03-29 23:10:33 UTC) #6
Ken Russell (switch to Gerrit)
10 years, 9 months ago (2010-03-30 00:27:01 UTC) #7
http://codereview.chromium.org/1546001/diff/39001/40003
File chrome/browser/child_process_host.cc (right):

http://codereview.chromium.org/1546001/diff/39001/40003#newcode83
chrome/browser/child_process_host.cc:83: if (resource_dispatcher_host_) {
On 2010/03/29 23:10:33, brettw wrote:
> Style nit: don't use {} here to match the surrounding code.

Done.

http://codereview.chromium.org/1546001/diff/39001/40005
File chrome/browser/gpu_process_host.cc (right):

http://codereview.chromium.org/1546001/diff/39001/40005#newcode138
chrome/browser/gpu_process_host.cc:138: if (Send(new
GpuMsg_EstablishChannel(renderer_id))) {
On 2010/03/29 23:10:33, brettw wrote:
> Don't add {} here either (especially since this was just old code)

jam commented earlier that {} is preferred around if/else. I'm going to leave
this as is.

http://codereview.chromium.org/1546001/diff/39001/40004
File chrome/browser/gpu_process_host_ui_shim.cc (right):

http://codereview.chromium.org/1546001/diff/39001/40004#newcode26
chrome/browser/gpu_process_host_ui_shim.cc:26: }  // anonymous namespace
On 2010/03/29 23:10:33, brettw wrote:
> just write // namespace

Done.

Powered by Google App Engine
This is Rietveld 408576698