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

Unified Diff: ui/gl/gl_context.h

Issue 221433004: gpu: Bind dummy GL API when no context is current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix two gpu unittests Created 6 years, 9 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
« no previous file with comments | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.h
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index f40b1bba78647ab9ef7090ffa420e4c5ba1b739c..63589c7cf3827edf3a3e4c4e32071d7162ec3e75 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -117,6 +117,18 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
protected:
virtual ~GLContext();
+ // Will release the current context when going out of scope, unless canceled.
+ class ScopedReleaseCurrent {
+ public:
+ ScopedReleaseCurrent();
+ ~ScopedReleaseCurrent();
+
+ void Cancel();
+
+ private:
+ bool canceled_;
+ };
+
// Sets the GL api to the real hardware API (vs the VirtualAPI)
static void SetRealGLApi();
virtual void SetCurrent(GLSurface* surface);
« no previous file with comments | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698