| Index: ui/gl/init/gl_factory_mac.cc
|
| diff --git a/ui/gl/init/gl_factory_mac.cc b/ui/gl/init/gl_factory_mac.cc
|
| index 243a7909b59e5ab9efa0e425a0a2079d6e55b868..1bcfbadd2e42d337b5e3201e8a2f9f4517eddc73 100644
|
| --- a/ui/gl/init/gl_factory_mac.cc
|
| +++ b/ui/gl/init/gl_factory_mac.cc
|
| @@ -32,7 +32,7 @@ class NoOpGLSurface : public GLSurface {
|
| explicit NoOpGLSurface(const gfx::Size& size) : size_(size) {}
|
|
|
| // Implement GLSurface.
|
| - bool Initialize(GLSurface::Format format) override { return true; }
|
| + bool Initialize(GLSurfaceFormat format) override { return true; }
|
| void Destroy() override {}
|
| bool IsOffscreen() override { return true; }
|
| gfx::SwapResult SwapBuffers() override {
|
| @@ -113,16 +113,19 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
|
| }
|
| }
|
|
|
| -scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
|
| +scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
|
| + const gfx::Size& size, GLSurfaceFormat format) {
|
| TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface");
|
| switch (GetGLImplementation()) {
|
| case kGLImplementationOSMesaGL:
|
| - return InitializeGLSurface(
|
| - new GLSurfaceOSMesa(GLSurface::SURFACE_OSMESA_RGBA, size));
|
| + format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_RGBA);
|
| + return InitializeGLSurfaceWithFormat(
|
| + new GLSurfaceOSMesa(format, size), format);
|
| case kGLImplementationDesktopGL:
|
| case kGLImplementationDesktopGLCoreProfile:
|
| case kGLImplementationAppleGL:
|
| - return InitializeGLSurface(new NoOpGLSurface(size));
|
| + return InitializeGLSurfaceWithFormat(
|
| + new NoOpGLSurface(size), format);
|
| case kGLImplementationMockGL:
|
| return new GLSurfaceStub;
|
| default:
|
|
|