Index: ui/gl/init/gl_factory_android.cc |
diff --git a/ui/gl/init/gl_factory_android.cc b/ui/gl/init/gl_factory_android.cc |
index e9c681f1cf7a914cc7a02e230068ede8ec95b009..91f728b3ce7ae5f32000b178c132d275ecc493ab 100644 |
--- a/ui/gl/init/gl_factory_android.cc |
+++ b/ui/gl/init/gl_factory_android.cc |
@@ -60,7 +60,7 @@ bool GLNonOwnedContext::Initialize(GLSurface* compatible_surface, |
} |
bool GLNonOwnedContext::MakeCurrent(GLSurface* surface) { |
- SetRealGLApi(); |
+ BindGLApi(); |
SetCurrent(surface); |
InitializeDynamicBindings(); |
return true; |
@@ -99,6 +99,12 @@ scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group, |
switch (GetGLImplementation()) { |
case kGLImplementationMockGL: |
return scoped_refptr<GLContext>(new GLContextStub(share_group)); |
+ case kGLImplementationStubGL: { |
+ scoped_refptr<GLContextStub> stub_context = |
+ new GLContextStub(share_group); |
+ stub_context->SetUseStubApi(true); |
+ return stub_context; |
+ } |
case kGLImplementationOSMesaGL: |
return InitializeGLContext(new GLContextOSMesa(share_group), |
compatible_surface, attribs); |
@@ -152,6 +158,7 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( |
} |
} |
case kGLImplementationMockGL: |
+ case kGLImplementationStubGL: |
return new GLSurfaceStub; |
default: |
NOTREACHED(); |