diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 22:54:29 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 22:54:29 +0000 |
commit | ffae402c58ea5e0787208ccdcd60b0f021b7ebd2 (patch) | |
tree | 0fdcbd1873b6a76b47d3074976a8e9f07b9d68ed /ui/gfx/compositor | |
parent | 8d9591d65ffcd08c5f69f5bb231f9c08a1f7042a (diff) | |
download | chromium_src-ffae402c58ea5e0787208ccdcd60b0f021b7ebd2.zip chromium_src-ffae402c58ea5e0787208ccdcd60b0f021b7ebd2.tar.gz chromium_src-ffae402c58ea5e0787208ccdcd60b0f021b7ebd2.tar.bz2 |
Reland 85013 - Split GLContext::Create*GLContext into GLSurface::Create*GLSurface plus a
surface type independent GLContext::CreateGLContext
TEST=try, including layout tests
BUG=none
Review URL: http://codereview.chromium.org/7013037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/compositor')
-rw-r--r-- | ui/gfx/compositor/compositor_gl.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc index 4beb65c..fa8e100 100644 --- a/ui/gfx/compositor/compositor_gl.cc +++ b/ui/gfx/compositor/compositor_gl.cc @@ -9,9 +9,10 @@ #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "ui/gfx/transform.h" -#include "ui/gfx/gl/gl_context.h" #include "ui/gfx/gl/gl_bindings.h" +#include "ui/gfx/gl/gl_context.h" #include "ui/gfx/gl/gl_implementation.h" +#include "ui/gfx/gl/gl_surface.h" namespace ui { @@ -38,8 +39,10 @@ class CompositorGL : public Compositor { }; CompositorGL::CompositorGL(gfx::AcceleratedWidget widget) - : gl_context_(gfx::GLContext::CreateViewGLContext(widget, false)), - started_(false) { + : started_(false) { + scoped_ptr<gfx::GLSurface> surface( + gfx::GLSurface::CreateViewGLSurface(widget)); + gl_context_.reset(gfx::GLContext::CreateGLContext(surface.release(), NULL)), } Texture* CompositorGL::CreateTexture() { @@ -89,8 +92,10 @@ class CompositorGL : public Compositor { }; CompositorGL::CompositorGL(gfx::AcceleratedWidget widget) - : gl_context_(gfx::GLContext::CreateViewGLContext(widget, false)), - started_(false) { + : started_(false) { + scoped_ptr<gfx::GLSurface> surface( + gfx::GLSurface::CreateViewGLSurface(widget)); + gl_context_.reset(gfx::GLContext::CreateGLContext(surface.release(), NULL)); } void CompositorGL::NotifyStart() { |