summaryrefslogtreecommitdiffstats
path: root/ui/gfx/compositor
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-01 01:46:38 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-01 01:46:38 +0000
commitfbe2037a09135bc592d77d10ebe7b057a4a6b3d2 (patch)
treebb6f4abca72b53bdf9e8ca860dba420dec09b448 /ui/gfx/compositor
parent1cce54290389788770bff8997c5d9fe7f323e3ea (diff)
downloadchromium_src-fbe2037a09135bc592d77d10ebe7b057a4a6b3d2.zip
chromium_src-fbe2037a09135bc592d77d10ebe7b057a4a6b3d2.tar.gz
chromium_src-fbe2037a09135bc592d77d10ebe7b057a4a6b3d2.tar.bz2
Reland 87371 - Support for glSetSurfaceCHROMIUM.
This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op. Review URL: http://codereview.chromium.org/7077001 Review URL: http://codereview.chromium.org/7006019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/compositor')
-rw-r--r--ui/gfx/compositor/compositor_gl.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
index cacf54b..7e6e297 100644
--- a/ui/gfx/compositor/compositor_gl.cc
+++ b/ui/gfx/compositor/compositor_gl.cc
@@ -71,8 +71,8 @@ class CompositorGL : public Compositor {
bool InitShaders();
// The GL context used for compositing.
- scoped_ptr<gfx::GLSurface> gl_surface_;
- scoped_ptr<gfx::GLContext> gl_context_;
+ scoped_refptr<gfx::GLSurface> gl_surface_;
+ scoped_refptr<gfx::GLContext> gl_context_;
gfx::Size size_;
// Shader program, attributes and uniforms.
@@ -205,8 +205,8 @@ void TextureGL::Draw(const ui::Transform& transform) {
CompositorGL::CompositorGL(gfx::AcceleratedWidget widget)
: started_(false) {
- gl_surface_.reset(gfx::GLSurface::CreateViewGLSurface(widget));
- gl_context_.reset(gfx::GLContext::CreateGLContext(NULL, gl_surface_.get())),
+ gl_surface_ = gfx::GLSurface::CreateViewGLSurface(widget);
+ gl_context_ = gfx::GLContext::CreateGLContext(NULL, gl_surface_.get());
gl_context_->MakeCurrent(gl_surface_.get());
if (!InitShaders())
LOG(ERROR) << "Unable to initialize shaders (context = "
@@ -372,8 +372,8 @@ class CompositorGL : public Compositor {
void RestoreTransform() OVERRIDE;
// The GL context used for compositing.
- scoped_ptr<gfx::GLSurface> gl_surface_;
- scoped_ptr<gfx::GLContext> gl_context_;
+ scoped_refptr<gfx::GLSurface> gl_surface_;
+ scoped_refptr<gfx::GLContext> gl_context_;
// Keep track of whether compositing has started or not.
bool started_;
@@ -383,8 +383,8 @@ class CompositorGL : public Compositor {
CompositorGL::CompositorGL(gfx::AcceleratedWidget widget)
: started_(false) {
- gl_surface_.reset(gfx::GLSurface::CreateViewGLSurface(widget));
- gl_context_.reset(gfx::GLContext::CreateGLContext(NULL, gl_surface_.get()));
+ gl_surface_ = gfx::GLSurface::CreateViewGLSurface(widget);
+ gl_context_ = gfx::GLContext::CreateGLContext(NULL, gl_surface_.get());
}
void CompositorGL::NotifyStart() {