Index: ui/gl/gl_surface.h |
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h |
index a8825a58c5a4a1af229047342862c6f746b9fe7a..cf918b54464fc2264c2b1232c5b9821c27ddd583 100644 |
--- a/ui/gl/gl_surface.h |
+++ b/ui/gl/gl_surface.h |
@@ -16,6 +16,7 @@ |
namespace gfx { |
class GLContext; |
+class VirtualGLApi; |
class VSyncProvider; |
// Encapsulates a surface that can be rendered to with GL, hiding platform |
@@ -107,19 +108,27 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
bool software, |
const gfx::Size& size); |
+ // Returns the last GLSurface made current, virtual or real. |
static GLSurface* GetCurrent(); |
protected: |
virtual ~GLSurface(); |
static bool InitializeOneOffInternal(); |
static void SetCurrent(GLSurface* surface); |
+ static void SetRealCurrent(GLSurface* surface); |
static bool ExtensionsContain(const char* extensions, const char* name); |
+ // Returns the last GLSurface made current with a real (non-virtual) context. |
+ static GLSurface* GetRealCurrent(); |
+ |
private: |
friend class base::RefCounted<GLSurface>; |
friend class GLContext; |
+ // For GetRealCurrent. |
+ friend class VirtualGLApi; |
+ |
DISALLOW_COPY_AND_ASSIGN(GLSurface); |
}; |