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

Unified Diff: content/common/gpu/gpu_channel_manager.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_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 299fbe20ff413cfd4760fae80a07b509851f77f4..d9653fee720e1805676c2738ddb3a4245c2d2839 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -62,6 +62,7 @@ GpuChannelManager::GpuChannelManager(
sync_point_client_waiter_(
sync_point_manager->CreateSyncPointClientWaiter()),
gpu_memory_buffer_factory_(gpu_memory_buffer_factory),
+ exiting_for_lost_context_(false),
weak_factory_(this) {
DCHECK(task_runner);
DCHECK(io_task_runner);
@@ -247,6 +248,17 @@ void GpuChannelManager::LoseAllContexts() {
weak_factory_.GetWeakPtr()));
}
+void GpuChannelManager::MaybeExitOnContextLost() {
+ if (!gpu_preferences().single_process && !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();
+ exiting_for_lost_context_ = true;
+ }
+}
+
void GpuChannelManager::DestroyAllChannels() {
gpu_channels_.clear();
}

Powered by Google App Engine
This is Rietveld 408576698