Chromium Code Reviews| Index: ui/gl/gl_surface.h |
| diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h |
| index a8825a58c5a4a1af229047342862c6f746b9fe7a..7ecfed30dcc4af689a5fe6bd6169e1ce5a59176e 100644 |
| --- a/ui/gl/gl_surface.h |
| +++ b/ui/gl/gl_surface.h |
| @@ -16,6 +16,8 @@ |
| namespace gfx { |
| class GLContext; |
| +class GLContextReal; |
| +class VirtualGLApi; |
| class VSyncProvider; |
| // Encapsulates a surface that can be rendered to with GL, hiding platform |
| @@ -107,19 +109,30 @@ 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(); |
|
no sievers
2013/06/05 16:43:37
...and do we then really need to track this separa
jonathan.backer
2013/06/05 20:40:11
Nope. I think that the DCHECK in gl_gl_api_impleme
|
| + |
| private: |
| friend class base::RefCounted<GLSurface>; |
| friend class GLContext; |
| + // For GetRealCurrent. |
| + friend class VirtualGLApi; |
| + |
| + // For SetRealCurrent. |
| + friend class GLContextReal; |
| + |
| DISALLOW_COPY_AND_ASSIGN(GLSurface); |
| }; |