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

Unified Diff: chrome/gpu/gpu_thread.cc

Issue 6189008: GPU service respects --single-process (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« chrome/gpu/gpu_channel.h ('K') | « chrome/gpu/gpu_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_thread.cc
===================================================================
--- chrome/gpu/gpu_thread.cc (revision 71128)
+++ chrome/gpu/gpu_thread.cc (working copy)
@@ -44,9 +44,13 @@
} // namespace
-GpuThread::GpuThread(const CommandLine& command_line)
- : command_line_(command_line) {}
+GpuThread::GpuThread() {
+}
+GpuThread::GpuThread(const std::string& channel_id)
+ : ChildThread(channel_id) {
+}
+
GpuThread::~GpuThread() {
}
@@ -108,7 +112,8 @@
gpu_info_.SetInitializationTime(base::Time::Now() - process_start_time_);
// Note that kNoSandbox will also disable the GPU sandbox.
- bool no_gpu_sandbox = command_line_.HasSwitch(switches::kNoGpuSandbox);
+ bool no_gpu_sandbox = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kNoGpuSandbox);
if (!no_gpu_sandbox) {
if (!InitializeGpuSandbox()) {
LOG(ERROR) << "Failed to initialize the GPU sandbox";
@@ -124,7 +129,8 @@
// slowly. Also disable the watchdog on valgrind because the code is expected
// to run slowly in that case.
bool enable_watchdog =
- !command_line_.HasSwitch(switches::kDisableGpuWatchdog) &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableGpuWatchdog) &&
gfx::GetGLImplementation() != gfx::kGLImplementationOSMesaGL &&
!RunningOnValgrind();
@@ -164,7 +170,7 @@
GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
if (iter == gpu_channels_.end())
- channel = new GpuChannel(renderer_id);
+ channel = new GpuChannel(this, renderer_id);
else
channel = iter->second;
« chrome/gpu/gpu_channel.h ('K') | « chrome/gpu/gpu_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698