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

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

Issue 1123343004: Add a --use-angle flag for selecting the ANGLE renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move dependency on gl.gyp into conditional. Created 5 years, 7 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 | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index d5e1dd9c13da2ddd33d6eda4832c31c27b02f8ee..d0a407bd5073238344b547341e82ce511f59536e 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -412,8 +412,10 @@ void GpuDataManagerImplPrivate::RegisterSwiftShaderPath(
}
bool GpuDataManagerImplPrivate::ShouldUseWarp() const {
- return use_warp_ ||
- base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp);
+ std::string angle_impl_flag =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kUseANGLE);
+ return use_warp_ || angle_impl_flag == gfx::kANGLEImplementationWARPName;
}
void GpuDataManagerImplPrivate::AddObserver(GpuDataManagerObserver* observer) {
@@ -680,8 +682,10 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
command_line->AppendSwitchASCII(switches::kGpuDriverVersion,
gpu_info_.driver_version);
- if (ShouldUseWarp())
- command_line->AppendSwitch(switches::kUseWarp);
+ if (ShouldUseWarp() && !command_line->HasSwitch(switches::kUseANGLE)) {
+ command_line->AppendSwitchASCII(switches::kUseANGLE,
+ gfx::kANGLEImplementationWARPName);
+ }
}
void GpuDataManagerImplPrivate::AppendPluginCommandLine(
« no previous file with comments | « no previous file | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698