summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/gpu_channel_host.cc
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 22:54:50 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 22:54:50 +0000
commit0100b7a2759c96bfa3813c0eb5f92e9683edff2e (patch)
tree516c5b77a95bacf27a4414e75e7d8e29aaba3f3d /chrome/renderer/gpu_channel_host.cc
parentf7c6df64064e4298e45635903264fe6b2971b229 (diff)
downloadchromium_src-0100b7a2759c96bfa3813c0eb5f92e9683edff2e.zip
chromium_src-0100b7a2759c96bfa3813c0eb5f92e9683edff2e.tar.gz
chromium_src-0100b7a2759c96bfa3813c0eb5f92e9683edff2e.tar.bz2
Moved creation of GPU transfer buffers into the browser process.
Transfer buffer creation was previously done in the GPU process. This is one step required to sandbox the GPU process. Rather than the GPU process opening a renderer process's handle by PID, which can't been done when sandboxed on Windows, the browser process passes the handle to the GPU process via the renderer process. TEST=try BUG=none Review URL: http://codereview.chromium.org/6557006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/gpu_channel_host.cc')
-rw-r--r--chrome/renderer/gpu_channel_host.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/renderer/gpu_channel_host.cc b/chrome/renderer/gpu_channel_host.cc
index c4354e7..4e6c075 100644
--- a/chrome/renderer/gpu_channel_host.cc
+++ b/chrome/renderer/gpu_channel_host.cc
@@ -17,7 +17,9 @@ GpuChannelHost::GpuChannelHost() : state_(kUnconnected) {
GpuChannelHost::~GpuChannelHost() {
}
-void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle) {
+void GpuChannelHost::Connect(
+ const IPC::ChannelHandle& channel_handle,
+ base::ProcessHandle renderer_process_for_gpu) {
// Open a channel to the GPU process.
channel_.reset(new IPC::SyncChannel(
channel_handle, IPC::Channel::MODE_CLIENT, this,
@@ -28,6 +30,10 @@ void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle) {
// and receives the hello message from the GPU process. The messages get
// cached.
state_ = kConnected;
+
+ // Notify the GPU process of our process handle. This gives it the ability
+ // to map renderer handles into the GPU process.
+ Send(new GpuChannelMsg_Initialize(renderer_process_for_gpu));
}
void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) {