| Index: ui/gfx/compositor/compositor_gl.cc
|
| diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
|
| index c28195c5a74411bf77f3df52ee4b605acd16be55..2894b3468df0797d429da9714110af42e7fe5411 100644
|
| --- a/ui/gfx/compositor/compositor_gl.cc
|
| +++ b/ui/gfx/compositor/compositor_gl.cc
|
| @@ -304,6 +304,10 @@ bool SharedResourcesGL::MakeSharedContextCurrent() {
|
| return context_->MakeCurrent(surface_.get());
|
| }
|
|
|
| +gfx::ScopedMakeCurrent* SharedResourcesGL::GetScopedMakeCurrent() {
|
| + return new gfx::ScopedMakeCurrent(context_.get(), surface_.get());
|
| +}
|
| +
|
| scoped_refptr<gfx::GLContext> SharedResourcesGL::CreateContext(
|
| gfx::GLSurface* surface) {
|
| if (initialized_)
|
| @@ -329,7 +333,7 @@ TextureGL::~TextureGL() {
|
| if (texture_id_) {
|
| SharedResourcesGL* instance = SharedResourcesGL::GetInstance();
|
| DCHECK(instance);
|
| - instance->MakeSharedContextCurrent();
|
| + scoped_ptr<gfx::ScopedMakeCurrent> bind(instance->GetScopedMakeCurrent());
|
| glDeleteTextures(1, &texture_id_);
|
| }
|
| }
|
|
|