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 508ccf925f0ba11cd62a69c97886c5f71d6e3b23..adf67aa747e1e34a0a307a6e086338cf5653ee2c 100644 |
--- a/ui/gfx/gl/gl_context_mac.mm |
+++ b/ui/gfx/gl/gl_context_mac.mm |
@@ -42,17 +42,16 @@ scoped_refptr<GLContext> GLContext::CreateGLContext( |
switch (GetGLImplementation()) { |
case kGLImplementationDesktopGL: { |
scoped_refptr<GLContext> context; |
- if (compatible_surface->IsOffscreen()) { |
- context = new GLContextCGL(share_group); |
- if (!context->Initialize(compatible_surface, gpu_preference)) |
- return NULL; |
- } else { |
#if defined(USE_AURA) |
- context = new GLContextNSView(share_group); |
- if (!context->Initialize(compatible_surface, gpu_preference)) |
- return NULL; |
-#endif |
- } |
+ DCHECK(!compatible_surface->IsOffscreen()); |
+ context = new GLContextNSView(share_group); |
+ if (!context->Initialize(compatible_surface, gpu_preference)) |
+ return NULL; |
+#else |
+ context = new GLContextCGL(share_group); |
+ if (!context->Initialize(compatible_surface, gpu_preference)) |
+ return NULL; |
+#endif // USE_AURA |
return context; |
} |