Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: ui/gfx/gl/gl_context_mac.mm

Issue 8687016: GLContextNSView should not assume concrete type GLSurface is GLSurfaceNSView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/gl/gl_context_nsview.mm » ('j') | ui/gfx/gl/gl_surface_nsview.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | ui/gfx/gl/gl_context_nsview.mm » ('j') | ui/gfx/gl/gl_surface_nsview.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698