diff options
author | bajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 04:11:18 +0000 |
---|---|---|
committer | bajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 04:11:18 +0000 |
commit | 27a7537f76eef214d84bfd21cdb0c6052f6df0f3 (patch) | |
tree | ae1783a806f7b78597f63371fd8087e7a400ed2d /content/browser/gpu/gpu_process_host.cc | |
parent | a4602585ca9dcabd9dc1b11bd57159ec8d0eb27c (diff) | |
download | chromium_src-27a7537f76eef214d84bfd21cdb0c6052f6df0f3.zip chromium_src-27a7537f76eef214d84bfd21cdb0c6052f6df0f3.tar.gz chromium_src-27a7537f76eef214d84bfd21cdb0c6052f6df0f3.tar.bz2 |
Added a flag to disable limiting the nuber of GPU crashes that are allowed
BUG=322815
Review URL: https://codereview.chromium.org/89243002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu/gpu_process_host.cc')
-rw-r--r-- | content/browser/gpu/gpu_process_host.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 2cb5874..26b33d4 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -428,6 +428,9 @@ GpuProcessHost::~GpuProcessHost() { static bool crashed_before = false; static int swiftshader_crash_count = 0; + bool disable_crash_limit = CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableGpuProcessCrashLimit); + // Ending only acts as a failure if the GPU process was actually started and // was intended for actual rendering (and not just checking caps or other // options). @@ -437,7 +440,8 @@ GpuProcessHost::~GpuProcessHost() { DIED_FIRST_TIME + swiftshader_crash_count, GPU_PROCESS_LIFETIME_EVENT_MAX); - if (++swiftshader_crash_count >= kGpuMaxCrashCount) { + if (++swiftshader_crash_count >= kGpuMaxCrashCount && + !disable_crash_limit) { // SwiftShader is too unstable to use. Disable it for current session. gpu_enabled_ = false; } @@ -462,8 +466,8 @@ GpuProcessHost::~GpuProcessHost() { crashed_before = true; last_gpu_crash_time = current_time; - if (gpu_recent_crash_count >= kGpuMaxCrashCount || - !initialized_) { + if ((gpu_recent_crash_count >= kGpuMaxCrashCount && !disable_crash_limit) + || !initialized_) { #if !defined(OS_CHROMEOS) // The gpu process is too unstable to use. Disable it for current // session. |