| 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..04213bbd592abf133d0483756caa427354b1f3ae 100644
|
| --- a/ui/gl/gl_implementation_android.cc
|
| +++ b/ui/gl/gl_implementation_android.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/native_library.h"
|
| #include "base/path_service.h"
|
| #include "ui/gl/gl_bindings.h"
|
| +#include "ui/gl/gl_context_mock_version.h"
|
| #include "ui/gl/gl_egl_api_implementation.h"
|
| #include "ui/gl/gl_gl_api_implementation.h"
|
| #include "ui/gl/gl_implementation.h"
|
| @@ -47,7 +48,7 @@ void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
|
| impls->push_back(kGLImplementationEGLGLES2);
|
| }
|
|
|
| -bool InitializeGLBindings(GLImplementation implementation) {
|
| +bool InitializeStaticGLBindings(GLImplementation implementation) {
|
| // Prevent reinitialization with a different implementation. Once the gpu
|
| // unit tests have initialized with kGLImplementationMock, we don't want to
|
| // later switch to another GL implementation.
|
| @@ -81,8 +82,8 @@ bool InitializeGLBindings(GLImplementation implementation) {
|
| AddGLNativeLibrary(gles_library);
|
| SetGLImplementation(kGLImplementationEGLGLES2);
|
|
|
| - InitializeGLBindingsGL();
|
| - InitializeGLBindingsEGL();
|
| + InitializeStaticGLBindingsGL();
|
| + InitializeStaticGLBindingsEGL();
|
|
|
| // These two functions take single precision float rather than double
|
| // precision float parameters in GLES.
|
| @@ -93,26 +94,30 @@ bool InitializeGLBindings(GLImplementation implementation) {
|
| case kGLImplementationMockGL: {
|
| SetGLGetProcAddressProc(GetMockGLProcAddress);
|
| SetGLImplementation(kGLImplementationMockGL);
|
| - InitializeGLBindingsGL();
|
| + InitializeStaticGLBindingsGL();
|
| break;
|
| }
|
| default:
|
| - NOTIMPLEMENTED() << "InitializeGLBindings on Android";
|
| + NOTIMPLEMENTED() << "InitializeStaticGLBindings on Android";
|
| return false;
|
| }
|
|
|
| return true;
|
| }
|
|
|
| -bool InitializeGLExtensionBindings(GLImplementation implementation,
|
| - GLContext* context) {
|
| +bool InitializeDynamicGLBindings(GLImplementation implementation,
|
| + GLContext* context) {
|
| switch (implementation) {
|
| case kGLImplementationEGLGLES2:
|
| - InitializeGLExtensionBindingsGL(context);
|
| - InitializeGLExtensionBindingsEGL(context);
|
| + InitializeDynamicGLBindingsGL(context);
|
| + InitializeDynamicGLBindingsEGL(context);
|
| break;
|
| case kGLImplementationMockGL:
|
| - InitializeGLExtensionBindingsGL(context);
|
| + {
|
| + scoped_refptr<GLContextMockVersion> mock_context(
|
| + new GLContextMockVersion("opengl es 3.0"));
|
| + InitializeDynamicGLBindingsGL(mock_context.get());
|
| + }
|
| break;
|
| default:
|
| return false;
|
|
|