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

Unified Diff: ui/gl/gl_context_mac.mm

Issue 227473009: Mac: Remove NSView support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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 | « ui/gl/gl.gyp ('k') | ui/gl/gl_context_nsview.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_mac.mm
diff --git a/ui/gl/gl_context_mac.mm b/ui/gl/gl_context_mac.mm
index 5a497cda47d0c8b92fcb77ab1659351826f1e278..4b9c8dd732b71f1d031af9e3bffc1f01cc54738a 100644
--- a/ui/gl/gl_context_mac.mm
+++ b/ui/gl/gl_context_mac.mm
@@ -8,7 +8,6 @@
#include "base/memory/scoped_ptr.h"
#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/gl/gl_context_cgl.h"
-#include "ui/gl/gl_context_nsview.h"
#include "ui/gl/gl_context_osmesa.h"
#include "ui/gl/gl_context_stub.h"
#include "ui/gl/gl_implementation.h"
@@ -28,10 +27,11 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(
case kGLImplementationDesktopGL:
case kGLImplementationAppleGL: {
scoped_refptr<GLContext> context;
- if (compatible_surface->IsOffscreen())
- context = new GLContextCGL(share_group);
- else
- context = new GLContextNSView(share_group);
+ // Note that with virtualization we might still be able to make current
+ // a different onscreen surface with this context later. But we should
+ // always be creating the context with an offscreen surface first.
+ DCHECK(compatible_surface->IsOffscreen());
+ context = new GLContextCGL(share_group);
if (!context->Initialize(compatible_surface, gpu_preference))
return NULL;
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_context_nsview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698