Chromium Code Reviews| Index: ui/gl/gl_surface_android.cc |
| diff --git a/ui/gl/gl_surface_android.cc b/ui/gl/gl_surface_android.cc |
| index 1254da225bdcbed21d6fe76091e5bb6087099317..eb6b491f8399f50f5eba5c846c0d7b1bfdc2fd2e 100644 |
| --- a/ui/gl/gl_surface_android.cc |
| +++ b/ui/gl/gl_surface_android.cc |
| @@ -31,21 +31,25 @@ bool GLSurface::InitializeOneOffInternal() { |
| // static |
| scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( |
| - gfx::AcceleratedWidget window) { |
| + gfx::AcceleratedWidget window, |
| + SurfaceConfiguration requested_configuration) { |
|
abarth-chromium
2015/06/09 00:30:22
const gfx::SurfaceConfiguration&
Below you use th
iansf
2015/06/09 01:52:05
Done.
|
| CHECK_NE(kGLImplementationNone, GetGLImplementation()); |
| if (GetGLImplementation() == kGLImplementationOSMesaGL) { |
| - scoped_refptr<GLSurface> surface(new GLSurfaceOSMesaHeadless()); |
| + scoped_refptr<GLSurface> surface( |
| + new GLSurfaceOSMesaHeadless(SurfaceConfiguration())); |
| if (!surface->Initialize()) |
| return NULL; |
| return surface; |
| } |
| DCHECK(GetGLImplementation() == kGLImplementationEGLGLES2); |
| if (window != kNullAcceleratedWidget) { |
| - scoped_refptr<GLSurface> surface = new NativeViewGLSurfaceEGL(window); |
| + scoped_refptr<GLSurface> surface = |
| + new NativeViewGLSurfaceEGL(window, requested_configuration); |
| if (surface->Initialize()) |
| return surface; |
| } else { |
| - scoped_refptr<GLSurface> surface = new GLSurfaceStub(); |
| + scoped_refptr<GLSurface> surface = |
| + new GLSurfaceStub(requested_configuration); |
| if (surface->Initialize()) |
| return surface; |
| } |
| @@ -54,12 +58,13 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( |
| // static |
| scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( |
| - const gfx::Size& size) { |
| + const gfx::Size& size, |
| + gfx::SurfaceConfiguration requested_configuration) { |
|
abarth-chromium
2015/06/09 00:30:22
const gfx::SurfaceConfiguration&
iansf
2015/06/09 01:52:04
Done.
|
| CHECK_NE(kGLImplementationNone, GetGLImplementation()); |
| switch (GetGLImplementation()) { |
| case kGLImplementationOSMesaGL: { |
| - scoped_refptr<GLSurface> surface( |
| - new GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, size)); |
| + scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa( |
| + OSMesaSurfaceFormatBGRA, size, requested_configuration)); |
| if (!surface->Initialize()) |
| return NULL; |
| @@ -69,9 +74,9 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( |
| scoped_refptr<GLSurface> surface; |
| if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() && |
| (size.width() == 0 && size.height() == 0)) { |
| - surface = new SurfacelessEGL(size); |
| + surface = new SurfacelessEGL(size, requested_configuration); |
| } else { |
| - surface = new PbufferGLSurfaceEGL(size); |
| + surface = new PbufferGLSurfaceEGL(size, requested_configuration); |
| } |
| if (!surface->Initialize()) |