| 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 905a15481a4f0baf6fda08d13179fdc173ee5791..f0e04d2343786f0c4e09beb2771dbbbc47e91518 100644
|
| --- a/content/common/gpu/gpu_command_buffer_stub.cc
|
| +++ b/content/common/gpu/gpu_command_buffer_stub.cc
|
| @@ -1114,26 +1114,34 @@ bool GpuCommandBufferStub::CheckContextLost() {
|
| gpu::CommandBuffer::State state = command_buffer_->GetLastState();
|
| bool was_lost = state.error == gpu::error::kLostContext;
|
|
|
| - // Work around issues with recovery by allowing a new GPU process to launch.
|
| - if (was_lost &&
|
| - context_group_->feature_info()->workarounds().exit_on_context_lost &&
|
| - !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kSingleProcess) &&
|
| - !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kInProcessGPU)) {
|
| - LOG(ERROR) << "Exiting GPU process because some drivers cannot recover"
|
| - << " from problems.";
|
| + if (was_lost) {
|
| + bool was_lost_by_robustness =
|
| + decoder_ && decoder_->WasContextLostByRobustnessExtension();
|
| +
|
| + // 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)) {
|
| + LOG(ERROR) << "Exiting GPU process because some drivers cannot recover"
|
| + << " from problems.";
|
| #if defined(OS_WIN)
|
| - base::win::SetShouldCrashOnProcessDetach(false);
|
| + base::win::SetShouldCrashOnProcessDetach(false);
|
| #endif
|
| - exit(0);
|
| + exit(0);
|
| + }
|
| +
|
| + // Lose all other contexts if the reset was triggered by the robustness
|
| + // extension instead of being synthetic.
|
| + if (was_lost_by_robustness &&
|
| + (gfx::GLContext::LosesAllContextsOnContextLost() ||
|
| + use_virtualized_gl_context_)) {
|
| + channel_->LoseAllContexts();
|
| + }
|
| }
|
| - // Lose all other contexts if the reset was triggered by the robustness
|
| - // extension instead of being synthetic.
|
| - if (was_lost && decoder_ && decoder_->WasContextLostByRobustnessExtension() &&
|
| - (gfx::GLContext::LosesAllContextsOnContextLost() ||
|
| - use_virtualized_gl_context_))
|
| - channel_->LoseAllContexts();
|
| +
|
| CheckCompleteWaits();
|
| return was_lost;
|
| }
|
|
|