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

Unified Diff: ui/gl/gl_surface_android.cc

Issue 1168993002: Update the native_viewport interface to allow specification of the surface configuration, currently… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Final cleanups Created 5 years, 6 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/gl_surface.cc ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_android.cc
diff --git a/ui/gl/gl_surface_android.cc b/ui/gl/gl_surface_android.cc
index e87e9a8a1b9e97c65f02dce0e831d76ad66139ed..38f1c81ffc8588f4e9bb5c1df5dbe1ee7aa3630e 100644
--- a/ui/gl/gl_surface_android.cc
+++ b/ui/gl/gl_surface_android.cc
@@ -36,21 +36,25 @@ bool GLSurface::InitializeOneOffInternal() {
// static
scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
- gfx::AcceleratedWidget window) {
+ gfx::AcceleratedWidget window,
+ const gfx::SurfaceConfiguration& requested_configuration) {
CHECK_NE(kGLImplementationNone, GetGLImplementation());
if (GetGLImplementation() == kGLImplementationOSMesaGL) {
- scoped_refptr<GLSurface> surface(new GLSurfaceOSMesaHeadless());
+ scoped_refptr<GLSurface> surface(
+ new GLSurfaceOSMesaHeadless(requested_configuration));
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;
}
@@ -59,12 +63,13 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
// static
scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
- const gfx::Size& size) {
+ const gfx::Size& size,
+ const gfx::SurfaceConfiguration& requested_configuration) {
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;
@@ -74,9 +79,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())
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698