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

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

Issue 2680423002: Introducing 2 usages for SwiftShader (Closed)
Patch Set: Added missing change to GpuDataManagerImplPrivate Created 3 years, 10 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_win.cc
diff --git a/ui/gl/init/gl_factory_win.cc b/ui/gl/init/gl_factory_win.cc
index bf0640c2a4a779b0fba624b088e106ddb2b34343..da07adc39bdad5f9fded0ed160b98cc7f53ba98c 100644
--- a/ui/gl/init/gl_factory_win.cc
+++ b/ui/gl/init/gl_factory_win.cc
@@ -31,6 +31,7 @@ std::vector<GLImplementation> GetAllowedGLImplementations() {
impls.push_back(kGLImplementationEGLGLES2);
impls.push_back(kGLImplementationDesktopGL);
impls.push_back(kGLImplementationOSMesaGL);
+ impls.push_back(kGLImplementationSwiftShaderGL);
return impls;
}
@@ -53,6 +54,7 @@ scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
case kGLImplementationOSMesaGL:
return InitializeGLContext(new GLContextOSMesa(share_group),
compatible_surface, attribs);
+ case kGLImplementationSwiftShaderGL:
case kGLImplementationEGLGLES2:
return InitializeGLContext(new GLContextEGL(share_group),
compatible_surface, attribs);
@@ -78,6 +80,7 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
switch (GetGLImplementation()) {
case kGLImplementationOSMesaGL:
return InitializeGLSurface(new GLSurfaceOSMesaWin(window));
+ case kGLImplementationSwiftShaderGL:
case kGLImplementationEGLGLES2: {
DCHECK(window != gfx::kNullAcceleratedWidget);
scoped_refptr<NativeViewGLSurfaceEGL> surface(
@@ -108,6 +111,7 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_RGBA);
return InitializeGLSurfaceWithFormat(
new GLSurfaceOSMesa(format, size), format);
+ case kGLImplementationSwiftShaderGL:
case kGLImplementationEGLGLES2:
return InitializeGLSurfaceWithFormat(
new PbufferGLSurfaceEGL(size), format);

Powered by Google App Engine
This is Rietveld 408576698