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

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

Issue 2715563002: Moving SwiftShader from component to bundled library (Closed)
Patch Set: Prevented !GpuAccessAllowed() from enabling SwiftShader 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 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>(

Powered by Google App Engine
This is Rietveld 408576698