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

Unified Diff: content/common/gpu/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: oops 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
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

Powered by Google App Engine
This is Rietveld 408576698