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

Unified Diff: ui/gl/gl_implementation_android.cc

Issue 23868030: Make it possible to use OSMesa on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: ui/gl/gl_implementation_android.cc
diff --git a/ui/gl/gl_implementation_android.cc b/ui/gl/gl_implementation_android.cc
index f644866b3d8e0aa257619b837ba50f77077913d2..bb1ddd7d6b82b88a6bdc050181391e04b00299c6 100644
--- a/ui/gl/gl_implementation_android.cc
+++ b/ui/gl/gl_implementation_android.cc
@@ -12,6 +12,7 @@
#include "ui/gl/gl_egl_api_implementation.h"
#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_implementation_osmesa.h"
#include "ui/gl/gl_osmesa_api_implementation.h"
namespace gfx {
@@ -27,24 +28,11 @@ void GL_BINDING_CALL MarshalDepthRangeToDepthRangef(GLclampd z_near,
glDepthRangef(static_cast<GLclampf>(z_near), static_cast<GLclampf>(z_far));
}
-base::NativeLibrary LoadLibrary(const base::FilePath& filename) {
- std::string error;
- base::NativeLibrary library = base::LoadNativeLibrary(filename, &error);
- if (!library) {
- DVLOG(1) << "Failed to load " << filename.MaybeAsASCII() << ": " << error;
- return NULL;
- }
- return library;
-}
-
-base::NativeLibrary LoadLibrary(const char* filename) {
- return LoadLibrary(base::FilePath(filename));
-}
-
} // namespace
void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
impls->push_back(kGLImplementationEGLGLES2);
+ impls->push_back(kGLImplementationOSMesaGL);
}
bool InitializeGLBindings(GLImplementation implementation) {
@@ -90,6 +78,8 @@ bool InitializeGLBindings(GLImplementation implementation) {
::gfx::g_driver_gl.fn.glDepthRangeFn = MarshalDepthRangeToDepthRangef;
break;
}
+ case kGLImplementationOSMesaGL:
+ return InitializeGLBindingsOSMesaGL();
case kGLImplementationMockGL: {
SetGLGetProcAddressProc(GetMockGLProcAddress);
SetGLImplementation(kGLImplementationMockGL);
@@ -111,6 +101,10 @@ bool InitializeGLExtensionBindings(GLImplementation implementation,
InitializeGLExtensionBindingsGL(context);
InitializeGLExtensionBindingsEGL(context);
break;
+ case kGLImplementationOSMesaGL:
+ InitializeGLExtensionBindingsGL(context);
+ InitializeGLExtensionBindingsOSMESA(context);
+ break;
case kGLImplementationMockGL:
InitializeGLExtensionBindingsGL(context);
break;

Powered by Google App Engine
This is Rietveld 408576698