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

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 6 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
« no previous file with comments | « ui/gl/gl_context_android.cc ('k') | ui/gl/gl_implementation_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_implementation_android.cc
diff --git a/ui/gl/gl_implementation_android.cc b/ui/gl/gl_implementation_android.cc
index 22d5ec63a120d1158e2624604b50ae4f2d747ec6..3fae1ee34441aa052ad0625379919b9c29627638 100644
--- a/ui/gl/gl_implementation_android.cc
+++ b/ui/gl/gl_implementation_android.cc
@@ -13,6 +13,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 {
@@ -28,24 +29,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 InitializeStaticGLBindings(GLImplementation implementation) {
@@ -93,6 +81,9 @@ bool InitializeStaticGLBindings(GLImplementation implementation) {
::gfx::g_driver_gl.fn.glDepthRangeFn = MarshalDepthRangeToDepthRangef;
break;
}
+ case kGLImplementationOSMesaGL:
+ InitializeStaticGLBindingsOSMesaGL();
+ break;
case kGLImplementationMockGL: {
SetGLImplementation(kGLImplementationMockGL);
InitializeStaticGLBindingsGL();
@@ -113,6 +104,10 @@ bool InitializeDynamicGLBindings(GLImplementation implementation,
InitializeDynamicGLBindingsGL(context);
InitializeDynamicGLBindingsEGL(context);
break;
+ case kGLImplementationOSMesaGL:
+ InitializeDynamicGLBindingsGL(context);
+ InitializeDynamicGLBindingsOSMESA(context);
+ break;
case kGLImplementationMockGL:
if (!context) {
scoped_refptr<GLContextStubWithExtensions> mock_context(
@@ -133,11 +128,13 @@ bool InitializeDynamicGLBindings(GLImplementation implementation,
void InitializeDebugGLBindings() {
InitializeDebugGLBindingsEGL();
InitializeDebugGLBindingsGL();
+ InitializeDebugGLBindingsOSMESA();
}
void ClearGLBindings() {
ClearGLBindingsEGL();
ClearGLBindingsGL();
+ ClearGLBindingsOSMESA();
SetGLImplementation(kGLImplementationNone);
UnloadGLNativeLibraries();
« no previous file with comments | « ui/gl/gl_context_android.cc ('k') | ui/gl/gl_implementation_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698