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

Unified Diff: ui/gl/init/gl_factory_win.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_ozone.cc ('k') | ui/gl/init/gl_factory_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory_win.cc
diff --git a/ui/gl/init/gl_factory_win.cc b/ui/gl/init/gl_factory_win.cc
index 97760c459974b3f31436810bb3467289fb0cd939..bf0640c2a4a779b0fba624b088e106ddb2b34343 100644
--- a/ui/gl/init/gl_factory_win.cc
+++ b/ui/gl/init/gl_factory_win.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;
@@ -86,6 +92,7 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
case kGLImplementationDesktopGL:
return InitializeGLSurface(new NativeViewGLSurfaceWGL(window));
case kGLImplementationMockGL:
+ case kGLImplementationStubGL:
return new GLSurfaceStub;
default:
NOTREACHED();
@@ -108,6 +115,7 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
return InitializeGLSurfaceWithFormat(
new PbufferGLSurfaceWGL(size), format);
case kGLImplementationMockGL:
+ case kGLImplementationStubGL:
return new GLSurfaceStub;
default:
NOTREACHED();
« no previous file with comments | « ui/gl/init/gl_factory_ozone.cc ('k') | ui/gl/init/gl_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698