summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gl/gl_context_linux.cc
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 20:34:15 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 20:34:15 +0000
commitf62a5abd6205c7a84a19f8b00b45b0792b767f57 (patch)
tree100e751f4e0302bbb4ecde919fb1cea272aeb7cf /ui/gfx/gl/gl_context_linux.cc
parent97807cbf58afe1e25b2bd014ce758e88e483d08b (diff)
downloadchromium_src-f62a5abd6205c7a84a19f8b00b45b0792b767f57.zip
chromium_src-f62a5abd6205c7a84a19f8b00b45b0792b767f57.tar.gz
chromium_src-f62a5abd6205c7a84a19f8b00b45b0792b767f57.tar.bz2
GLContext no longer holds a pointer to a GLSurface.
This is part of an ongoing effort to treat GL contexts and GL surfaces as independent entities. TEST=run WebGL on mac, windows and linux, trybots BUG=none Review URL: http://codereview.chromium.org/7021014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_context_linux.cc')
-rw-r--r--ui/gfx/gl/gl_context_linux.cc24
1 files changed, 8 insertions, 16 deletions
diff --git a/ui/gfx/gl/gl_context_linux.cc b/ui/gfx/gl/gl_context_linux.cc
index 3db60f3..b68ed183 100644
--- a/ui/gfx/gl/gl_context_linux.cc
+++ b/ui/gfx/gl/gl_context_linux.cc
@@ -20,34 +20,26 @@
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 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();
}
case kGLImplementationEGLGLES2: {
- scoped_ptr<GLContextEGL> context(
- new GLContextEGL(
- static_cast<GLSurfaceEGL*>(surface.release())));
- if (!context->Initialize(shared_context))
+ scoped_ptr<GLContextEGL> context(new GLContextEGL);
+ if (!context->Initialize(shared_context, compatible_surface))
return NULL;
return context.release();
}
case kGLImplementationDesktopGL: {
- scoped_ptr<GLContextGLX> context(
- new GLContextGLX(
- static_cast<GLSurfaceGLX*>(surface.release())));
- if (!context->Initialize(shared_context))
+ scoped_ptr<GLContextGLX> context(new GLContextGLX);
+ if (!context->Initialize(shared_context, compatible_surface))
return NULL;
return context.release();