| Index: ui/gfx/gl/gl_surface.cc
|
| diff --git a/ui/gfx/gl/gl_surface.cc b/ui/gfx/gl/gl_surface.cc
|
| index 3ff4fd1479bc88d740e3533af3c919d5e4958a18..401ecb269132c845992d05d80ec9506baeea3f1c 100644
|
| --- a/ui/gfx/gl/gl_surface.cc
|
| +++ b/ui/gfx/gl/gl_surface.cc
|
| @@ -70,13 +70,7 @@ bool GLSurface::InitializeOneOff() {
|
| return initialized;
|
| }
|
|
|
| -GLSurface::GLSurface() {
|
| -}
|
| -
|
| -GLSurface::~GLSurface() {
|
| - if (GetCurrent() == this)
|
| - SetCurrent(NULL);
|
| -}
|
| +GLSurface::GLSurface() {}
|
|
|
| bool GLSurface::Initialize()
|
| {
|
| @@ -134,15 +128,16 @@ GLSurface* GLSurface::GetCurrent() {
|
| return current_surface_.Pointer()->Get();
|
| }
|
|
|
| -void GLSurface::SetCurrent(GLSurface* surface) {
|
| - current_surface_.Pointer()->Set(surface);
|
| +GLSurface::~GLSurface() {
|
| + if (GetCurrent() == this)
|
| + SetCurrent(NULL);
|
| }
|
|
|
| -GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {
|
| +void GLSurface::SetCurrent(GLSurface* surface) {
|
| + current_surface_.Pointer()->Set(surface);
|
| }
|
|
|
| -GLSurfaceAdapter::~GLSurfaceAdapter() {
|
| -}
|
| +GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {}
|
|
|
| bool GLSurfaceAdapter::Initialize() {
|
| return surface_->Initialize();
|
| @@ -208,4 +203,6 @@ unsigned GLSurfaceAdapter::GetFormat() {
|
| return surface_->GetFormat();
|
| }
|
|
|
| +GLSurfaceAdapter::~GLSurfaceAdapter() {}
|
| +
|
| } // namespace gfx
|
|
|