diff options
Diffstat (limited to 'content/browser/gpu/gpu_process_host.cc')
-rw-r--r-- | content/browser/gpu/gpu_process_host.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 2f17226..3b3fc5c 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -11,7 +11,6 @@ #include "base/process_util.h" #include "base/string_piece.h" #include "base/threading/thread.h" -#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" #include "content/browser/browser_thread.h" #include "content/browser/gpu/gpu_data_manager.h" #include "content/browser/gpu/gpu_process_host_ui_shim.h" @@ -31,6 +30,8 @@ #include "ui/gfx/gtk_native_view_id_manager.h" #endif +bool GpuProcessHost::gpu_enabled_ = true; + namespace { enum GPUProcessLifetimeEvent { @@ -502,17 +503,15 @@ void GpuProcessHost::OnProcessCrashed(int exit_code) { SendOutstandingReplies(); if (++g_gpu_crash_count >= kGpuMaxCrashCount) { // The gpu process is too unstable to use. Disable it for current session. - RenderViewHostDelegateHelper::set_gpu_enabled(false); + gpu_enabled_ = false; } BrowserChildProcessHost::OnProcessCrashed(exit_code); } bool GpuProcessHost::LaunchGpuProcess() { - if (!RenderViewHostDelegateHelper::gpu_enabled() || - g_gpu_crash_count >= kGpuMaxCrashCount) - { + if (!gpu_enabled_ || g_gpu_crash_count >= kGpuMaxCrashCount) { SendOutstandingReplies(); - RenderViewHostDelegateHelper::set_gpu_enabled(false); + gpu_enabled_ = false; return false; } |