| 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 0ff8e1142f17199eefddfb05bc3a5684093c1b25..df2db41a30e283c41618f20e5a901e19eebd48dc 100644
|
| --- a/content/common/gpu/gpu_command_buffer_stub.cc
|
| +++ b/content/common/gpu/gpu_command_buffer_stub.cc
|
| @@ -460,7 +460,12 @@ void GpuCommandBufferStub::Destroy() {
|
|
|
| if (initialized_) {
|
| GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
|
| - if ((surface_handle_ == gpu::kNullSurfaceHandle) && !active_url_.is_empty())
|
| + // If we are currently shutting down the GPU process to help with recovery
|
| + // (exit_on_context_lost workaround), then don't tell the browser about
|
| + // offscreen context destruction here since it's not client-invoked, and
|
| + // might bypass the 3D API blocking logic.
|
| + if ((surface_handle_ == gpu::kNullSurfaceHandle) && !active_url_.is_empty()
|
| + && !gpu_channel_manager->IsExitingForContextLost())
|
| gpu_channel_manager->delegate()->DidDestroyOffscreenContext(active_url_);
|
| }
|
|
|
| @@ -1092,14 +1097,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) &&
|
| - !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
|
| - // gracefully.
|
| - base::MessageLoop::current()->QuitNow();
|
| + context_group_->feature_info()->workarounds().exit_on_context_lost)) {
|
| + channel_->gpu_channel_manager()->MaybeExitOnContextLost();
|
| }
|
|
|
| // Lose all other contexts if the reset was triggered by the robustness
|
|
|