Index: content/common/gpu/gpu_command_buffer_stub.cc |
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc |
index eae3cd4fcf62ca667a4e9bd725705f977eaa80d4..c0855148b2c5f110635f14bef9d4fb40d6f276cf 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.cc |
+++ b/content/common/gpu/gpu_command_buffer_stub.cc |
@@ -216,8 +216,9 @@ GpuCommandBufferStub::GpuCommandBufferStub( |
attrib_parser.bind_generates_resource); |
} else { |
context_group_ = new gpu::gles2::ContextGroup( |
- mailbox_manager, new GpuCommandBufferMemoryTracker( |
- channel, command_buffer_id_.GetUnsafeValue()), |
+ channel_->gpu_channel_manager()->gpu_preferences(), mailbox_manager, |
+ new GpuCommandBufferMemoryTracker(channel, |
+ command_buffer_id_.GetUnsafeValue()), |
channel_->gpu_channel_manager()->shader_translator_cache(), |
channel_->gpu_channel_manager()->framebuffer_completeness_cache(), NULL, |
subscription_ref_set, pending_valuebuffer_state, |
@@ -621,8 +622,8 @@ void GpuCommandBufferStub::OnInitialize( |
return; |
} |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableGPUServiceLogging)) { |
+ if (channel_->gpu_channel_manager()-> |
+ gpu_preferences().enable_gpu_service_logging) { |
decoder_->set_log_commands(true); |
} |
@@ -1129,10 +1130,8 @@ bool GpuCommandBufferStub::CheckContextLost() { |
// Work around issues with recovery by allowing a new GPU process to launch. |
if ((was_lost_by_robustness || |
context_group_->feature_info()->workarounds().exit_on_context_lost) && |
- !base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSingleProcess) && |
- !base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kInProcessGPU)) { |
+ !channel_->gpu_channel_manager()->gpu_preferences().single_process && |
+ !channel_->gpu_channel_manager()->gpu_preferences().in_process_gpu) { |
LOG(ERROR) << "Exiting GPU process because some drivers cannot recover" |
<< " from problems."; |
// Signal the message loop to quit to shut down other threads |