diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 20:09:49 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 20:09:49 +0000 |
commit | 6b889fb5d046cdecc27c2b2d56e2400dd7c10270 (patch) | |
tree | c779e93c795d927ebc2e6f68017792a0ac797abd /chrome/gpu | |
parent | b31db6c5e7d3f42f1de7d7095c609c18f6fd4d08 (diff) | |
download | chromium_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')
-rw-r--r-- | chrome/gpu/gpu_channel.cc | 9 | ||||
-rw-r--r-- | chrome/gpu/gpu_main.cc | 6 |
2 files changed, 15 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, diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc index c633025..86652e5 100644 --- a/chrome/gpu/gpu_main.cc +++ b/chrome/gpu/gpu_main.cc @@ -5,6 +5,7 @@ #include "base/message_loop.h" #include "build/build_config.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/main_function_params.h" #include "chrome/gpu/gpu_config.h" #include "chrome/gpu/gpu_process.h" @@ -28,6 +29,11 @@ int GpuMain(const MainFunctionParams& parameters) { InitCrashReporter(); #endif + const CommandLine& command_line = parameters.command_line_; + if (command_line.HasSwitch(switches::kGpuStartupDialog)) { + ChildProcess::WaitForDebugger(L"Gpu"); + } + MessageLoop main_message_loop(MessageLoop::TYPE_UI); std::wstring app_name = chrome::kBrowserAppName; PlatformThread::SetName(WideToASCII(app_name + L"_GpuMain").c_str()); |