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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2281253002: Fix code to avoid launching Swiftshader if it's crashed too often. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index faa4ebd939e945a5b7905f53cb25a3ff2c88983f..7ac4f5ee567824f8bc32b0844176dbcf8120aea1 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -969,13 +969,6 @@ void GpuProcessHost::StopGpuProcess() {
}
bool GpuProcessHost::LaunchGpuProcess(gpu::GpuPreferences* gpu_preferences) {
- if (!(gpu_enabled_ &&
- GpuDataManagerImpl::GetInstance()->ShouldUseSwiftShader()) &&
- !hardware_gpu_enabled_) {
- SendOutstandingReplies();
- return false;
- }
-
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
@@ -1032,6 +1025,13 @@ bool GpuProcessHost::LaunchGpuProcess(gpu::GpuPreferences* gpu_preferences) {
(cmd_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader");
}
+ bool current_gpu_type_enabled =
+ swiftshader_rendering_ ? gpu_enabled_ : hardware_gpu_enabled_;
+ if (!current_gpu_type_enabled) {
+ SendOutstandingReplies();
+ return false;
+ }
+
UMA_HISTOGRAM_BOOLEAN("GPU.GPU.GPUProcessSoftwareRendering",
swiftshader_rendering_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698