Chromium Code Reviews| Index: ui/gl/gl_surface.cc | 
| diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc | 
| index 7fcb093c9f6434d524d5f4d41f9b90f87c68b546..70f2207150e1915546efe462b716a17e5eae0697 100644 | 
| --- a/ui/gl/gl_surface.cc | 
| +++ b/ui/gl/gl_surface.cc | 
| @@ -16,6 +16,7 @@ | 
| #include "ui/gl/gl_context.h" | 
| #include "ui/gl/gl_image.h" | 
| #include "ui/gl/gl_implementation.h" | 
| +#include "ui/gl/gl_surface_format.h" | 
| #include "ui/gl/gl_switches.h" | 
| namespace gl { | 
| @@ -28,10 +29,10 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky | 
| GLSurface::GLSurface() {} | 
| bool GLSurface::Initialize() { | 
| - return Initialize(SURFACE_DEFAULT); | 
| + return Initialize(GLSurfaceFormat()); | 
| } | 
| -bool GLSurface::Initialize(GLSurface::Format format) { | 
| +bool GLSurface::Initialize(GLSurfaceFormat format) { | 
| return true; | 
| } | 
| @@ -134,9 +135,9 @@ unsigned long GLSurface::GetCompatibilityKey() { | 
| return 0; | 
| } | 
| -GLSurface::Format GLSurface::GetFormat() { | 
| +GLSurfaceFormat GLSurface::GetFormat() { | 
| NOTIMPLEMENTED(); | 
| - return SURFACE_DEFAULT; | 
| + return GLSurfaceFormat(); | 
| } | 
| gfx::VSyncProvider* GLSurface::GetVSyncProvider() { | 
| @@ -205,7 +206,7 @@ void GLSurface::OnSetSwapInterval(int interval) { | 
| GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {} | 
| -bool GLSurfaceAdapter::Initialize(GLSurface::Format format) { | 
| +bool GLSurfaceAdapter::Initialize(GLSurfaceFormat format) { | 
| return surface_->Initialize(format); | 
| } | 
| @@ -328,7 +329,7 @@ unsigned long GLSurfaceAdapter::GetCompatibilityKey() { | 
| return surface_->GetCompatibilityKey(); | 
| } | 
| -GLSurface::Format GLSurfaceAdapter::GetFormat() { | 
| +GLSurfaceFormat GLSurfaceAdapter::GetFormat() { | 
| return surface_->GetFormat(); | 
| } | 
| @@ -359,12 +360,17 @@ bool GLSurfaceAdapter::BuffersFlipped() const { | 
| GLSurfaceAdapter::~GLSurfaceAdapter() {} | 
| -scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { | 
| - if (!surface->Initialize()) | 
| 
 
bajones
2017/01/04 22:31:55
Nit: This function doesn't actually need to change
 
klausw
2017/01/05 00:55:13
I needed a new Initialize..WithFormat, and I don't
 
 | 
| +scoped_refptr<GLSurface> InitializeGLSurfaceWithFormat( | 
| + scoped_refptr<GLSurface> surface, GLSurfaceFormat format) { | 
| + if (!surface->Initialize(format)) | 
| return nullptr; | 
| return surface; | 
| } | 
| +scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { | 
| + return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); | 
| +} | 
| + | 
| GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; | 
| GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = | 
| default; |