From 0b7a2fff445beb2c5de1e2a632540a4107e00708 Mon Sep 17 00:00:00 2001 From: "rsesek@chromium.org" Date: Tue, 31 May 2011 21:53:38 +0000 Subject: Revert 87371 - Broke Compile - 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 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7027008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87373 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/gfx/surface/accelerated_surface_mac.cc | 10 +++++----- ui/gfx/surface/accelerated_surface_mac.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ui/gfx/surface') diff --git a/ui/gfx/surface/accelerated_surface_mac.cc b/ui/gfx/surface/accelerated_surface_mac.cc index ce2f7a0..a749c46 100644 --- a/ui/gfx/surface/accelerated_surface_mac.cc +++ b/ui/gfx/surface/accelerated_surface_mac.cc @@ -35,14 +35,14 @@ bool AcceleratedSurface::Initialize(gfx::GLContext* share_context, if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) return false; - gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); + gl_surface_.reset(gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); if (!gl_surface_.get()) { Destroy(); return false; } - gl_context_ = gfx::GLContext::CreateGLContext(share_context, - gl_surface_.get()); + gl_context_.reset(gfx::GLContext::CreateGLContext(share_context, + gl_surface_.get())); if (!gl_context_.get()) { Destroy(); return false; @@ -66,8 +66,8 @@ void AcceleratedSurface::Destroy() { } transport_dib_.reset(); - gl_context_ = NULL; - gl_surface_ = NULL; + gl_context_.reset(); + gl_surface_.reset(); } // Call after making changes to the surface which require a visual update. diff --git a/ui/gfx/surface/accelerated_surface_mac.h b/ui/gfx/surface/accelerated_surface_mac.h index d9ee833..13bec9b 100644 --- a/ui/gfx/surface/accelerated_surface_mac.h +++ b/ui/gfx/surface/accelerated_surface_mac.h @@ -129,8 +129,8 @@ class AcceleratedSurface { // speaking, we do not need to allocate a GL context all of the // time. We only need one if (a) we are using the IOSurface code // path, or (b) if we are allocating an FBO internally. - scoped_refptr gl_surface_; - scoped_refptr gl_context_; + scoped_ptr gl_surface_; + scoped_ptr gl_context_; // Either |io_surface_| or |transport_dib_| is a valid pointer, but not both. // |io_surface_| is non-NULL if the IOSurface APIs are supported (Mac OS X // 10.6 and later). -- cgit v1.1