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

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

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: 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
Index: ui/gl/init/gl_factory_mac.cc
diff --git a/ui/gl/init/gl_factory_mac.cc b/ui/gl/init/gl_factory_mac.cc
index 1bcfbadd2e42d337b5e3201e8a2f9f4517eddc73..fce7f2e159680b5769d05a762db6da3a82cd97f8 100644
--- a/ui/gl/init/gl_factory_mac.cc
+++ b/ui/gl/init/gl_factory_mac.cc
@@ -87,6 +87,12 @@ scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
compatible_surface, attribs);
case kGLImplementationMockGL:
return new GLContextStub(share_group);
+ case kGLImplementationStubGL: {
+ scoped_refptr<GLContextStub> stub_context =
+ new GLContextStub(share_group);
+ stub_context->SetUseStubApi(true);
+ return stub_context;
+ }
default:
NOTREACHED();
return nullptr;
@@ -106,6 +112,7 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
return InitializeGLSurface(new GLSurfaceOSMesaHeadless());
}
case kGLImplementationMockGL:
+ case kGLImplementationStubGL:
return new GLSurfaceStub;
default:
NOTREACHED();
@@ -127,6 +134,7 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
return InitializeGLSurfaceWithFormat(
new NoOpGLSurface(size), format);
case kGLImplementationMockGL:
+ case kGLImplementationStubGL:
return new GLSurfaceStub;
default:
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698