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

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: 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.cc » ('j') | ui/gl/gl_surface_egl.cc » ('J')
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..4277fbe3c8afae9e34ec5005778e6dbb0fcc9b10 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;
Zhenyao Mo 2015/05/07 22:08:35 The only place use_warp_ is set to true is ForceWa
Geoff Lang 2015/05/11 13:31:50 Looks like use_warp_ is referenced in GpuDataManag
}
void GpuDataManagerImplPrivate::AddObserver(GpuDataManagerObserver* observer) {
@@ -680,8 +682,11 @@ 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.cc » ('j') | ui/gl/gl_surface_egl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698