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

Unified Diff: ui/gl/init/gl_factory_android.cc

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 11 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/gpu_timing_unittest.cc ('k') | ui/gl/init/gl_factory_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ui/gl/gpu_timing_unittest.cc ('k') | ui/gl/init/gl_factory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698