summaryrefslogtreecommitdiffstats
path: root/chrome/gpu/gpu_channel.cc
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 20:09:49 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 20:09:49 +0000
commit6b889fb5d046cdecc27c2b2d56e2400dd7c10270 (patch)
treec779e93c795d927ebc2e6f68017792a0ac797abd /chrome/gpu/gpu_channel.cc
parentb31db6c5e7d3f42f1de7d7095c609c18f6fd4d08 (diff)
downloadchromium_src-6b889fb5d046cdecc27c2b2d56e2400dd7c10270.zip
chromium_src-6b889fb5d046cdecc27c2b2d56e2400dd7c10270.tar.gz
chromium_src-6b889fb5d046cdecc27c2b2d56e2400dd7c10270.tar.bz2
Fixed bugs in GPU process startup on POSIX platforms. Added
--gpu-startup-dialog command line option to allow debugging of GPU process. BUG=none TEST=none (tested manually in development workspace) Review URL: http://codereview.chromium.org/1095005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu/gpu_channel.cc')
-rw-r--r--chrome/gpu/gpu_channel.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc
index 25bb951..4269022 100644
--- a/chrome/gpu/gpu_channel.cc
+++ b/chrome/gpu/gpu_channel.cc
@@ -177,6 +177,15 @@ void GpuChannel::OnDestroyCommandBuffer(int route_id) {
bool GpuChannel::Init(const std::string& channel_name) {
channel_name_ = channel_name;
+#if defined(OS_POSIX)
+ // This gets called when the GpuChannel is initially created. At this
+ // point, create the socketpair and assign the GPU side FD to the channel
+ // name. Keep the renderer side FD as a member variable in the PluginChannel
+ // to be able to transmit it through IPC.
+ int gpu_fd;
+ IPC::SocketPair(&gpu_fd, &renderer_fd_);
+ IPC::AddChannelSocket(channel_name, gpu_fd);
+#endif
channel_.reset(new IPC::SyncChannel(
channel_name, IPC::Channel::MODE_SERVER, this, NULL,
ChildProcess::current()->io_message_loop(), false,