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

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

Issue 2715563002: Moving SwiftShader from component to bundled library (Closed)
Patch Set: Update past extension test fixes Created 3 years, 9 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 | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_initializer_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e3b67c5f9439bd9f8e84e2237d08b76ccc5905ad 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,18 +135,6 @@ bool InitializeStaticEGLInternal() {
return false;
}
-#if BUILDFLAG(ENABLE_SWIFTSHADER)
- if (using_swift_shader) {
- // Register key so that SwiftShader doesn't display watermark logo.
- typedef void (__stdcall *RegisterFunc)(const char* key);
- RegisterFunc reg = reinterpret_cast<RegisterFunc>(
- base::GetFunctionPointerFromNativeLibrary(gles_library, "Register"));
- if (reg) {
- reg("SS3GCKK6B448CF63");
- }
- }
-#endif
-
GLGetProcAddressProc get_proc_address =
reinterpret_cast<GLGetProcAddressProc>(
base::GetFunctionPointerFromNativeLibrary(egl_library,
« no previous file with comments | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_initializer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698