diff options
author | antonm@chromium.org <antonm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 13:37:32 +0000 |
---|---|---|
committer | antonm@chromium.org <antonm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 13:37:32 +0000 |
commit | 82642bb1c9402e67e46e0a48bdc075fd505fa36d (patch) | |
tree | cdbf1eea862acdbc63634ba23e3a8b921bbf72bf /ui/gfx/surface | |
parent | cc12116ee5640dcca9507900f259ed6d6ed4542b (diff) | |
download | chromium_src-82642bb1c9402e67e46e0a48bdc075fd505fa36d.zip chromium_src-82642bb1c9402e67e46e0a48bdc075fd505fa36d.tar.gz chromium_src-82642bb1c9402e67e46e0a48bdc075fd505fa36d.tar.bz2 |
Revert "Reland 85013 - Split GLContext::Create*GLContext into GLSurface::Create*GLSurface plus a
surface type independent GLContext::CreateGLContext".
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/surface')
-rw-r--r-- | ui/gfx/surface/accelerated_surface_mac.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/ui/gfx/surface/accelerated_surface_mac.cc b/ui/gfx/surface/accelerated_surface_mac.cc index 2210a6f..43c6890 100644 --- a/ui/gfx/surface/accelerated_surface_mac.cc +++ b/ui/gfx/surface/accelerated_surface_mac.cc @@ -8,7 +8,6 @@ #include "base/mac/scoped_cftyperef.h" #include "ui/gfx/gl/gl_bindings.h" #include "ui/gfx/gl/gl_implementation.h" -#include "ui/gfx/gl/gl_surface.h" #include "ui/gfx/rect.h" #include "ui/gfx/surface/io_surface_support_mac.h" @@ -27,7 +26,7 @@ bool AcceleratedSurface::Initialize(gfx::GLContext* share_context, allocate_fbo_ = allocate_fbo; // Ensure GL is initialized before trying to create an offscreen GL context. - if (!gfx::GLSurface::InitializeOneOff()) + if (!gfx::GLContext::InitializeOneOff()) return false; // Drawing to IOSurfaces via OpenGL only works with desktop GL and @@ -35,19 +34,9 @@ bool AcceleratedSurface::Initialize(gfx::GLContext* share_context, if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) return false; - scoped_ptr<gfx::GLSurface> surface(gfx::GLSurface::CreateOffscreenGLSurface( - gfx::Size(1, 1))); - if (!surface.get()) { - Destroy(); - return false; - } - - gl_context_.reset(gfx::GLContext::CreateGLContext(surface.release(), - share_context)); - if (!gl_context_.get()) { - Destroy(); + gl_context_.reset(gfx::GLContext::CreateOffscreenGLContext(share_context)); + if (!gl_context_.get()) return false; - } // Now we're ready to handle SetSurfaceSize calls, which will // allocate and/or reallocate the IOSurface and associated offscreen |