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

Issue 6343006: Route IPC through browser when creating a viewable command buffer. (Closed)

Created:
9 years, 11 months ago by jonathan.backer
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, apatrick_chromium, brettw-cc_chromium.org, piman, nduca, Nico
Visibility:
Public.

Description

Route IPC through browser when creating a viewable command buffer. The communications path for creating a viewable command buffer used to be directly from the renderer (gpu_channel.cc) to the gpu process (gpu_channel.cc). This patch makes the browser an intermediary: - renderer (gpu_channel.cc) makes a synchronous request to the browser (picked up in renderer_message_filter.cc and forwarded to gpu_process_host.cc) - browser (gpu_process_host.cc) makes an asynchronous request to the gpu process (picked up in gpu_thread.cc and forwarded to gpu_channel.cc) for the command buffer - gpu process (gpu_thread.cc) sends an ACK with the route_id for the command buffer back to the browser (gpu_process_host.cc) - browser (gpu_process_host.cc) sends a delayed reply back to the renderer (gpu_channel_host.cc), which had blocked There are several motivations for this patch: - creating an onscreen command buffer requires a window to draw into (which is acquired/locked in the browser); by routing through the browser, we can acquire the get the window beforehand (thereby preventing a deadlock in some other work that I'm doing) - we can eliminate several separate synchronous IPC messages for obtaining and releasing the window associated with drawing (I've tried to unify the different code paths for Linux, Windows, and Mac) - in the future, we can have the browser allocate SHM for the command buffer and transfer buffers, allowing us to sandbox the gpu process BUG=none TEST=by hand on all 3 platforms, trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72798

Patch Set 1 #

Patch Set 2 : Cleanup the IPC #

Patch Set 3 : Some final cleanup before review. #

Total comments: 8

Patch Set 4 : Fix nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -256 lines) Patch
M chrome/browser/gpu_process_host.h View 1 2 3 5 chunks +23 lines, -8 lines 0 comments Download
M chrome/browser/gpu_process_host.cc View 1 2 3 7 chunks +126 lines, -13 lines 0 comments Download
M chrome/browser/gpu_process_host_ui_shim.h View 1 2 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/gpu_process_host_ui_shim.cc View 1 2 5 chunks +51 lines, -65 lines 0 comments Download
M chrome/browser/renderer_host/render_message_filter.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_message_filter.cc View 1 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/common/gpu_messages_internal.h View 1 2 4 chunks +23 lines, -28 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/gpu/gpu_channel.h View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/gpu/gpu_channel.cc View 3 chunks +17 lines, -49 lines 0 comments Download
M chrome/gpu/gpu_command_buffer_stub.cc View 1 2 3 2 chunks +5 lines, -15 lines 0 comments Download
M chrome/gpu/gpu_thread.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/gpu/gpu_thread.cc View 1 2 3 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/renderer/ggl/ggl.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/ggl/ggl.cc View 1 5 chunks +5 lines, -7 lines 0 comments Download
M chrome/renderer/gpu_channel_host.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/gpu_channel_host.cc View 1 3 chunks +4 lines, -5 lines 0 comments Download
M chrome/renderer/render_widget_fullscreen_pepper.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/renderer/render_widget_fullscreen_pepper.cc View 1 4 chunks +0 lines, -21 lines 0 comments Download
M chrome/renderer/webgraphicscontext3d_command_buffer_impl.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc View 1 2 3 3 chunks +1 line, -25 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
jonathan.backer
9 years, 11 months ago (2011-01-25 14:44:14 UTC) #1
jam
http://codereview.chromium.org/6343006/diff/9001/chrome/browser/renderer_host/render_message_filter.cc File chrome/browser/renderer_host/render_message_filter.cc (right): http://codereview.chromium.org/6343006/diff/9001/chrome/browser/renderer_host/render_message_filter.cc#newcode1429 chrome/browser/renderer_host/render_message_filter.cc:1429: void RenderMessageFilter::OnCreateViewCommandBuffer( There are 3 GPU related messages now ...
9 years, 11 months ago (2011-01-25 17:30:21 UTC) #2
apatrick
This is a great improvement. A few thoughts about the organization of things in GpuChannelHost. ...
9 years, 11 months ago (2011-01-26 19:50:05 UTC) #3
jonathan.backer
Responds to comments, fixed a nit, and rebased off of ToT. http://codereview.chromium.org/6343006/diff/9001/chrome/browser/gpu_process_host.cc File chrome/browser/gpu_process_host.cc (right): ...
9 years, 11 months ago (2011-01-26 20:42:17 UTC) #4
Ken Russell (switch to Gerrit)
This looks good to me. I don't have any substantive comments beyond those from the ...
9 years, 11 months ago (2011-01-26 21:52:34 UTC) #5
jam
On Wed, Jan 26, 2011 at 12:42 PM, <backer@chromium.org> wrote: > Responds to comments, fixed ...
9 years, 11 months ago (2011-01-26 22:08:05 UTC) #6
apatrick_chromium
9 years, 11 months ago (2011-01-26 22:22:58 UTC) #7
LGTM

Powered by Google App Engine
This is Rietveld 408576698