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

Unified Diff: ui/gl/gl_context.h

Issue 15928002: GPU: Keep track of the last real context and real surface made current. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make GetRealCurrent protected. Created 7 years, 7 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
Index: ui/gl/gl_context.h
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index dc65f64a8ae6baad9b6990ef104a46ba445b99d4..e396ca0cc2258e2c515f56b130b4a069cbc147cb 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -88,6 +88,7 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
static bool LosesAllContextsOnContextLost();
+ // Returns the last GLContext made current, virtual or real.
static GLContext* GetCurrent();
virtual bool WasAllocatedUsingRobustnessExtension();
@@ -114,9 +115,17 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
// current.
bool InitializeExtensionBindings();
+ virtual bool IsVirtualContext();
+
+ // Returns the last real (non-virtual) GLContext made current.
+ static GLContext* GetRealCurrent();
+
private:
friend class base::RefCounted<GLContext>;
+ // For GetRealCurrent.
+ friend class VirtualGLApi;
+
scoped_refptr<GLShareGroup> share_group_;
scoped_ptr<VirtualGLApi> virtual_gl_api_;
scoped_ptr<GLStateRestorer> state_restorer_;

Powered by Google App Engine
This is Rietveld 408576698