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 c8648a761c74c8ef097a58414c79008466d00176..13c8e08aa0bf35c8994ffadcfecbb17715e25e25 100644 |
--- a/ui/gl/init/gl_initializer_win.cc |
+++ b/ui/gl/init/gl_initializer_win.cc |
@@ -104,11 +104,13 @@ bool InitializeStaticEGLInternal() { |
(use_gl == kGLImplementationSwiftShaderName) || |
(use_gl == kGLImplementationSwiftShaderForWebGLName); |
if (using_swift_shader) { |
- if (!command_line->HasSwitch(switches::kSwiftShaderPath)) |
- return false; |
- gles_path = command_line->GetSwitchValuePath(switches::kSwiftShaderPath); |
+#if BUILDFLAG(ENABLE_SWIFTSHADER) |
+ gles_path = module_path.Append(L"swiftshader/"); |
// Preload library |
LoadLibrary(L"ddraw.dll"); |
+#else |
+ return false; |
+#endif |
} else { |
gles_path = module_path; |
} |
@@ -133,7 +135,9 @@ bool InitializeStaticEGLInternal() { |
return false; |
} |
-#if BUILDFLAG(ENABLE_SWIFTSHADER) |
+ // Note: This is no longer required by SwiftShader, but we will keep this |
+ // registration code for the time being in case someone attemps to |
+ // use a legacy version of SwiftShader with Chromium. |
if (using_swift_shader) { |
// Register key so that SwiftShader doesn't display watermark logo. |
typedef void (__stdcall *RegisterFunc)(const char* key); |
@@ -143,7 +147,6 @@ bool InitializeStaticEGLInternal() { |
reg("SS3GCKK6B448CF63"); |
} |
} |
-#endif |
GLGetProcAddressProc get_proc_address = |
reinterpret_cast<GLGetProcAddressProc>( |