From 9f668362af799212f3345477f01540ffbc656ed1 Mon Sep 17 00:00:00 2001 From: "dhollowa@chromium.org" Date: Wed, 30 Nov 2011 15:48:22 +0000 Subject: 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 --- ui/gfx/gl/gl_surface_nsview.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/gfx/gl/gl_surface_nsview.mm') 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(context); + return true; } } // namespace gfx -- cgit v1.1