Chromium Code Reviews| Index: ui/gfx/gl/scoped_make_current.h |
| diff --git a/ui/gfx/gl/scoped_make_current.h b/ui/gfx/gl/scoped_make_current.h |
| index d0d74f71efa79438b2b62b7e53604b4ff5848a2d..dfe65d7fff0c4c34923b0e0b4d795e18fb0e21e3 100644 |
| --- a/ui/gfx/gl/scoped_make_current.h |
| +++ b/ui/gfx/gl/scoped_make_current.h |
| @@ -6,12 +6,13 @@ |
| #define UI_GFX_GL_SCOPED_MAKE_CURRENT_H_ |
| #pragma once |
| +#include "base/memory/ref_counted.h" |
| #include "ui/gfx/gl/gl_context.h" |
| #include "ui/gfx/gl/gl_surface.h" |
| namespace gfx { |
| -class GL_EXPORT ScopedMakeCurrent { |
| +class GL_EXPORT ScopedMakeCurrent : public base::RefCounted<ScopedMakeCurrent> { |
|
sky
2011/10/31 20:44:45
Having a RAII object be ref counted breaks the mod
|
| public: |
| explicit ScopedMakeCurrent(GLContext* context, GLSurface* surface); |
| ~ScopedMakeCurrent(); |
| @@ -24,6 +25,8 @@ class GL_EXPORT ScopedMakeCurrent { |
| scoped_refptr<GLContext> context_; |
| scoped_refptr<GLSurface> surface_; |
| bool succeeded_; |
| + |
| + friend class base::RefCounted<ScopedMakeCurrent>; |
| DISALLOW_COPY_AND_ASSIGN(ScopedMakeCurrent); |
| }; |