Index: ui/gfx/gl/gl_context_mac.cc |
=================================================================== |
--- ui/gfx/gl/gl_context_mac.cc (revision 86168) |
+++ ui/gfx/gl/gl_context_mac.cc (working copy) |
@@ -16,25 +16,19 @@ |
namespace gfx { |
-GLContext* GLContext::CreateGLContext(GLSurface* compatible_surface, |
- GLContext* shared_context) { |
- scoped_ptr<GLSurface> surface(compatible_surface); |
- |
+GLContext* GLContext::CreateGLContext(GLContext* shared_context, |
+ GLSurface* compatible_surface) { |
switch (GetGLImplementation()) { |
case kGLImplementationDesktopGL: { |
- scoped_ptr<GLContextCGL> context( |
- new GLContextCGL( |
- static_cast<GLSurfaceCGL*>(surface.release()))); |
- if (!context->Initialize(shared_context)) |
+ scoped_ptr<GLContextCGL> context(new GLContextCGL); |
+ if (!context->Initialize(shared_context, compatible_surface)) |
return NULL; |
return context.release(); |
} |
case kGLImplementationOSMesaGL: { |
- scoped_ptr<GLContextOSMesa> context( |
- new GLContextOSMesa( |
- static_cast<GLSurfaceOSMesa*>(surface.release()))); |
- if (!context->Initialize(OSMESA_RGBA, shared_context)) |
+ scoped_ptr<GLContextOSMesa> context(new GLContextOSMesa); |
+ if (!context->Initialize(shared_context, compatible_surface)) |
return NULL; |
return context.release(); |