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

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

Issue 1542013005: Add a new driver bug workaround SANDBOX_START_EARLY Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 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/gl_initializer_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_initializer_x11.cc
diff --git a/ui/gl/init/gl_initializer_x11.cc b/ui/gl/init/gl_initializer_x11.cc
index fc8435d3eacec296067896c236bc87c1e2cf9d31..511d17368a283aff90a6a967f75e855eee600c33 100644
--- a/ui/gl/init/gl_initializer_x11.cc
+++ b/ui/gl/init/gl_initializer_x11.cc
@@ -192,5 +192,40 @@ void ClearGLBindingsPlatform() {
ClearGLBindingsOSMESA();
}
+bool GetNativeLibraryNamesFromGLImplementationPlatform(
+ GLImplementation implementation,
+ std::vector<std::string>* required_libraries) {
+ DCHECK(required_libraries);
+ required_libraries->clear();
+
+ switch (implementation) {
+ case kGLImplementationDesktopGL:
+ required_libraries->push_back(kGLLibraryName);
+ break;
+ case kGLImplementationEGLGLES2: {
+ base::FilePath glesv2_path(kGLESv2LibraryName);
+ base::FilePath egl_path(kEGLLibraryName);
+
+ if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kUseGL) == kGLImplementationANGLEName) {
+ base::FilePath module_path;
+ if (!PathService::Get(base::DIR_MODULE, &module_path))
+ return false;
+
+ glesv2_path = module_path.Append(kGLESv2ANGLELibraryName);
+ egl_path = module_path.Append(kEGLANGLELibraryName);
+ }
+
+ required_libraries->push_back(glesv2_path.value());
+ required_libraries->push_back(egl_path.value());
+ break;
+ }
+ default:
+ return false;
+ }
+
+ return true;
+}
+
} // namespace init
} // namespace gl
« no previous file with comments | « ui/gl/init/gl_initializer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698