| Index: ui/gfx/gl/gl_surface_mac.cc
|
| diff --git a/ui/gfx/gl/gl_surface_mac.cc b/ui/gfx/gl/gl_surface_mac.cc
|
| index 0f6cdd48bb0523a4209ec2cc325c6a83dc3be7de..fbe90e3d79b897b103fadb3a0926cb969f1a4f19 100644
|
| --- a/ui/gfx/gl/gl_surface_mac.cc
|
| +++ b/ui/gfx/gl/gl_surface_mac.cc
|
| @@ -13,6 +13,10 @@
|
| #include "ui/gfx/gl/gl_surface_osmesa.h"
|
| #include "ui/gfx/gl/gl_surface_stub.h"
|
|
|
| +#if defined(USE_WEBKIT_COMPOSITOR)
|
| +#include "ui/gfx/gl/gl_surface_nsview.h"
|
| +#endif
|
| +
|
| namespace gfx {
|
|
|
| bool GLSurface::InitializeOneOffInternal() {
|
| @@ -32,7 +36,27 @@ bool GLSurface::InitializeOneOffInternal() {
|
| scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
|
| bool software,
|
| gfx::PluginWindowHandle window) {
|
| - return CreateOffscreenGLSurface(software, gfx::Size(1, 1));
|
| +#if defined(USE_WEBKIT_COMPOSITOR)
|
| + if (software)
|
| + return NULL;
|
| +
|
| + switch (GetGLImplementation()) {
|
| + case kGLImplementationDesktopGL: {
|
| + scoped_refptr<GLSurface> surface(new GLSurfaceNSView(window));
|
| + if (!surface->Initialize())
|
| + return NULL;
|
| +
|
| + return surface;
|
| + }
|
| + case kGLImplementationMockGL:
|
| + return new GLSurfaceStub;
|
| + default:
|
| + NOTREACHED();
|
| + return NULL;
|
| + }
|
| +#else
|
| + return CreateOffscreenGLSurface(software, gfx::Size(1,1));
|
| +#endif
|
| }
|
|
|
| scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
|
|
|