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

Unified Diff: ui/gl/init/gl_factory_x11.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/init/gl_factory_win.cc ('k') | ui/gl/init/gl_initializer_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory_x11.cc
diff --git a/ui/gl/init/gl_factory_x11.cc b/ui/gl/init/gl_factory_x11.cc
index ec3f1ada0e47a3c97056500a973bfe2ae5fc6df8..0b7fc2db01450291dc8808702ddd7d77f2ae636b 100644
--- a/ui/gl/init/gl_factory_x11.cc
+++ b/ui/gl/init/gl_factory_x11.cc
@@ -61,6 +61,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;
@@ -78,6 +84,7 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
DCHECK(window != gfx::kNullAcceleratedWidget);
return InitializeGLSurface(new NativeViewGLSurfaceEGLX11(window));
case kGLImplementationMockGL:
+ case kGLImplementationStubGL:
return new GLSurfaceStub;
default:
NOTREACHED();
@@ -100,6 +107,7 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
return InitializeGLSurfaceWithFormat(
new PbufferGLSurfaceEGL(size), format);
case kGLImplementationMockGL:
+ case kGLImplementationStubGL:
return new GLSurfaceStub;
default:
NOTREACHED();
« no previous file with comments | « ui/gl/init/gl_factory_win.cc ('k') | ui/gl/init/gl_initializer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698