| Index: ui/gfx/gl/gl_context_mac.mm
|
| diff --git a/ui/gfx/gl/gl_context_mac.mm b/ui/gfx/gl/gl_context_mac.mm
|
| index adf67aa747e1e34a0a307a6e086338cf5653ee2c..2fcd085c304c2a4291e430c7856b676b36466f48 100644
|
| --- a/ui/gfx/gl/gl_context_mac.mm
|
| +++ b/ui/gfx/gl/gl_context_mac.mm
|
| @@ -43,15 +43,15 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(
|
| case kGLImplementationDesktopGL: {
|
| scoped_refptr<GLContext> context;
|
| #if defined(USE_AURA)
|
| - DCHECK(!compatible_surface->IsOffscreen());
|
| - context = new GLContextNSView(share_group);
|
| - if (!context->Initialize(compatible_surface, gpu_preference))
|
| - return NULL;
|
| + if (compatible_surface->IsOffscreen())
|
| + context = new GLContextCGL(share_group);
|
| + else
|
| + context = new GLContextNSView(share_group);
|
| #else
|
| context = new GLContextCGL(share_group);
|
| +#endif // USE_AURA
|
| if (!context->Initialize(compatible_surface, gpu_preference))
|
| return NULL;
|
| -#endif // USE_AURA
|
|
|
| return context;
|
| }
|
|
|