summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gl/gl_surface_nsview.mm
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 15:48:22 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 15:48:22 +0000
commit9f668362af799212f3345477f01540ffbc656ed1 (patch)
tree991707b5a293880d4616695071549d941bccd63b /ui/gfx/gl/gl_surface_nsview.mm
parent95f1939b70b9959bb82cc219a5dad2d0e4a8509f (diff)
downloadchromium_src-9f668362af799212f3345477f01540ffbc656ed1.zip
chromium_src-9f668362af799212f3345477f01540ffbc656ed1.tar.gz
chromium_src-9f668362af799212f3345477f01540ffbc656ed1.tar.bz2
GLContextNSView should not assume concrete type GLSurface is GLSurfaceNSView
This is follow-up from review http://codereview.chromium.org/8486020. This eliminates down-cast of GLSurface in CLContextNSView::Initialize in favor of GLSurfaceNSView::OnMakeCurrent implementation. Also, allows offscreen path in USE_AURA due to its usage in SharedResourcesCC. BUG=104390 TEST=compositor_unittests --gtest_filter=LayerWithRealCompositorTest.* R=apatrick@chromium.org Review URL: http://codereview.chromium.org/8687016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_surface_nsview.mm')
-rw-r--r--ui/gfx/gl/gl_surface_nsview.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/gfx/gl/gl_surface_nsview.mm b/ui/gfx/gl/gl_surface_nsview.mm
index 0c7f3aa..e03cb3b 100644
--- a/ui/gfx/gl/gl_surface_nsview.mm
+++ b/ui/gfx/gl/gl_surface_nsview.mm
@@ -39,8 +39,9 @@ void* GLSurfaceNSView::GetHandle() {
return view_;
}
-void GLSurfaceNSView::SetGLContext(GLContextNSView* context) {
- context_ = context;
+bool GLSurfaceNSView::OnMakeCurrent(GLContext* context) {
+ context_ = static_cast<GLContextNSView *>(context);
+ return true;
}
} // namespace gfx