Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: ui/gfx/gl/scoped_make_current.h

Issue 8418035: Fix gl context change on dropping a texture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as recommended as per backer Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/gfx/compositor/compositor_gl.h ('K') | « ui/gfx/compositor/compositor_gl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« ui/gfx/compositor/compositor_gl.h ('K') | « ui/gfx/compositor/compositor_gl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698