| Index: ui/gl/gl_context.h
|
| diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
|
| index 27a1a786d2727340932ca03c59952c8709b9aa40..365c76d6947c14074aa6fa39589cfd60a909d5dd 100644
|
| --- a/ui/gl/gl_context.h
|
| +++ b/ui/gl/gl_context.h
|
| @@ -9,12 +9,19 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "ui/gl/gl_share_group.h"
|
| #include "ui/gl/gpu_preference.h"
|
|
|
| +namespace gpu {
|
| +namespace gles2 {
|
| +class GLES2Decoder;
|
| +}
|
| +}
|
| namespace gfx {
|
|
|
| class GLSurface;
|
| +class VirtualGLApi;
|
|
|
| // Encapsulates an OpenGL context, hiding platform specific management.
|
| class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
|
| @@ -44,6 +51,9 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
|
| // Get the underlying platform specific GL context "handle".
|
| virtual void* GetHandle() = 0;
|
|
|
| + // Gets the decoder for the context.
|
| + virtual const gpu::gles2::GLES2Decoder* GetDecoder();
|
| +
|
| // Set swap interval. This context must be current.
|
| virtual void SetSwapInterval(int interval) = 0;
|
|
|
| @@ -75,8 +85,17 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
|
|
|
| virtual bool WasAllocatedUsingRobustnessExtension();
|
|
|
| + // Use this context for virtualization.
|
| + void SetupForVirtualization();
|
| +
|
| + // Make this context current when used for context virtualization.
|
| + bool MakeVirtuallyCurrent(GLContext* virutal_context, GLSurface* surface);
|
| +
|
| protected:
|
| virtual ~GLContext();
|
| +
|
| + // Sets the GL api to the real hardware API (vs the VirtualAPI)
|
| + static void SetRealGLApi();
|
| static void SetCurrent(GLContext* context, GLSurface* surface);
|
|
|
| // Initialize function pointers to extension functions in the GL
|
| @@ -88,6 +107,7 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
|
| friend class base::RefCounted<GLContext>;
|
|
|
| scoped_refptr<GLShareGroup> share_group_;
|
| + scoped_ptr<VirtualGLApi> virtual_gl_api_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(GLContext);
|
| };
|
|
|