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

Unified Diff: chrome/gpu/gpu_channel.cc

Issue 1095005: Fixed bugs in GPU process startup on POSIX platforms. Added... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/gpu/gpu_channel.cc
===================================================================
--- chrome/gpu/gpu_channel.cc (revision 42147)
+++ chrome/gpu/gpu_channel.cc (working copy)
@@ -177,6 +177,15 @@
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,
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/gpu/gpu_main.cc » ('j') | chrome/gpu/gpu_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698