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

Unified Diff: ui/gl/init/gl_initializer_win.cc

Issue 2680423002: Introducing 2 usages for SwiftShader (Closed)
Patch Set: Added missing change to GpuDataManagerImplPrivate Created 3 years, 10 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
Index: ui/gl/init/gl_initializer_win.cc
diff --git a/ui/gl/init/gl_initializer_win.cc b/ui/gl/init/gl_initializer_win.cc
index 6116bfbd9a4b604ec2c5f0e8f80fd04fd9d0c386..c8648a761c74c8ef097a58414c79008466d00176 100644
--- a/ui/gl/init/gl_initializer_win.cc
+++ b/ui/gl/init/gl_initializer_win.cc
@@ -98,9 +98,11 @@ bool InitializeStaticEGLInternal() {
base::FilePath gles_path;
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
+ const std::string use_gl =
+ command_line->GetSwitchValueASCII(switches::kUseGL);
bool using_swift_shader =
- command_line->GetSwitchValueASCII(switches::kUseGL) ==
- kGLImplementationSwiftShaderName;
+ (use_gl == kGLImplementationSwiftShaderName) ||
+ (use_gl == kGLImplementationSwiftShaderForWebGLName);
if (using_swift_shader) {
if (!command_line->HasSwitch(switches::kSwiftShaderPath))
return false;
@@ -242,6 +244,7 @@ bool InitializeGLOneOffPlatform() {
return false;
}
break;
+ case kGLImplementationSwiftShaderGL:
case kGLImplementationEGLGLES2:
if (!GLSurfaceEGL::InitializeOneOff(GetDC(nullptr))) {
LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
@@ -273,6 +276,7 @@ bool InitializeStaticGLBindings(GLImplementation implementation) {
switch (implementation) {
case kGLImplementationOSMesaGL:
return InitializeStaticOSMesaInternal();
+ case kGLImplementationSwiftShaderGL:
case kGLImplementationEGLGLES2:
return InitializeStaticEGLInternal();
case kGLImplementationDesktopGL:

Powered by Google App Engine
This is Rietveld 408576698