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

Unified Diff: gpu/ipc/service/gpu_command_buffer_stub.cc

Issue 1747283003: Remove redundant codepath for webgl api blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.cc ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_command_buffer_stub.cc
diff --git a/gpu/ipc/service/gpu_command_buffer_stub.cc b/gpu/ipc/service/gpu_command_buffer_stub.cc
index 164853a2518326232b473a7aee12a784681d6aa4..f6f52ff8613985f37518c49f1c7fb76fb92eb054 100644
--- a/gpu/ipc/service/gpu_command_buffer_stub.cc
+++ b/gpu/ipc/service/gpu_command_buffer_stub.cc
@@ -460,8 +460,14 @@ void GpuCommandBufferStub::Destroy() {
if (initialized_) {
GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
- if ((surface_handle_ == 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->is_exiting_for_lost_context()) {
gpu_channel_manager->delegate()->DidDestroyOffscreenContext(active_url_);
+ }
}
if (decoder_)
@@ -1092,14 +1098,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
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.cc ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698