| Index: gpu/ipc/service/gpu_channel_manager.cc
|
| diff --git a/gpu/ipc/service/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc
|
| index 1edf84976ac6ff3ce99709188d0ccf027d8fd85f..8a1f8a4dd08e62351d437747cafa07980e258b87 100644
|
| --- a/gpu/ipc/service/gpu_channel_manager.cc
|
| +++ b/gpu/ipc/service/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();
|
| }
|
|
|