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

Unified Diff: ui/gfx/gl/gl_context_nsview.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
Index: ui/gfx/gl/gl_context_nsview.mm
diff --git a/ui/gfx/gl/gl_context_nsview.mm b/ui/gfx/gl/gl_context_nsview.mm
index a3aa7aac31c58bcdd90079b6a01c413da7eadc9c..1ad1c6de1a02ec66923bdecb38357d7ab975d36c 100644
--- a/ui/gfx/gl/gl_context_nsview.mm
+++ b/ui/gfx/gl/gl_context_nsview.mm
@@ -46,9 +46,6 @@ bool GLContextNSView::Initialize(GLSurface* surface,
return false;
}
- // Allow the surface to call back when in need of |FlushBuffer|.
- static_cast<GLSurfaceNSView*>(surface)->SetGLContext(this);
-
return true;
}
@@ -64,6 +61,12 @@ bool GLContextNSView::MakeCurrent(GLSurface* surface) {
if ([view window])
[context_ setView:view];
[context_ makeCurrentContext];
+
+ if (!surface->OnMakeCurrent(this)) {
+ LOG(ERROR) << "Unable to make gl context current.";
+ return false;
+ }
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698