| 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..da0d56f17a9ea7fb01af07281421da16467c3b88 100644
|
| --- a/ui/gl/init/gl_factory_mac.cc
|
| +++ b/ui/gl/init/gl_factory_mac.cc
|
| @@ -115,14 +115,23 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
|
|
|
| scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
|
| TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface");
|
| + scoped_refptr<GLSurface> surface =
|
| + CreateUninitializedOffscreenGLSurface(size);
|
| + if (surface && GetGLImplementation() != kGLImplementationMockGL)
|
| + InitializeGLSurface(surface);
|
| + return surface;
|
| +}
|
| +
|
| +scoped_refptr<GLSurface> CreateUninitializedOffscreenGLSurface(
|
| + const gfx::Size& size) {
|
| + TRACE_EVENT0("gpu", "gl::init::CreateUninitializedOffscreenGLSurface");
|
| switch (GetGLImplementation()) {
|
| case kGLImplementationOSMesaGL:
|
| - return InitializeGLSurface(
|
| - new GLSurfaceOSMesa(GLSurface::SURFACE_OSMESA_RGBA, size));
|
| + return new GLSurfaceOSMesa(GLSurface::SURFACE_OSMESA_RGBA, size);
|
| case kGLImplementationDesktopGL:
|
| case kGLImplementationDesktopGLCoreProfile:
|
| case kGLImplementationAppleGL:
|
| - return InitializeGLSurface(new NoOpGLSurface(size));
|
| + return new NoOpGLSurface(size);
|
| case kGLImplementationMockGL:
|
| return new GLSurfaceStub;
|
| default:
|
|
|