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

Unified Diff: ui/gl/init/gl_initializer_android.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.h ('k') | ui/gl/init/gl_initializer_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_initializer_android.cc
diff --git a/ui/gl/init/gl_initializer_android.cc b/ui/gl/init/gl_initializer_android.cc
index a6a1bc4c022a202c7a9575f23feedf62f4862815..d94e6eaf76f789baacd9e52e94907a55e55d36ae 100644
--- a/ui/gl/init/gl_initializer_android.cc
+++ b/ui/gl/init/gl_initializer_android.cc
@@ -21,11 +21,15 @@ namespace init {
namespace {
+const char kGLESv2LibraryName[] = "libGLESv2.so";
+const char kEGLLibraryName[] = "libEGL.so";
+
bool InitializeStaticEGLInternal() {
- base::NativeLibrary gles_library = LoadLibraryAndPrintError("libGLESv2.so");
+ base::NativeLibrary gles_library =
+ LoadLibraryAndPrintError(kGLESv2LibraryName);
if (!gles_library)
return false;
- base::NativeLibrary egl_library = LoadLibraryAndPrintError("libEGL.so");
+ base::NativeLibrary egl_library = LoadLibraryAndPrintError(kEGLLibraryName);
if (!egl_library) {
base::UnloadNativeLibrary(gles_library);
return false;
@@ -102,5 +106,24 @@ void ClearGLBindingsPlatform() {
ClearGLBindingsOSMESA();
}
+bool GetNativeLibraryNamesFromGLImplementationPlatform(
+ GLImplementation implementation,
+ std::vector<std::string>* required_libraries) {
+ DCHECK(required_libraries);
+ required_libraries->clear();
+
+ switch (implementation) {
+ case kGLImplementationEGLGLES2: {
+ required_libraries->push_back(kGLESv2LibraryName);
+ required_libraries->push_back(kEGLLibraryName);
+ break;
+ }
+ default:
+ return false;
+ }
+
+ return true;
+}
+
} // namespace init
} // namespace gl
« no previous file with comments | « ui/gl/init/gl_initializer.h ('k') | ui/gl/init/gl_initializer_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698