summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gl/gl_context.h')
-rw-r--r--ui/gl/gl_context.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index 5eac838..4577be3 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -19,9 +19,12 @@
namespace gfx {
class GLSurface;
+class GPUTiming;
+class GPUTimingClient;
class VirtualGLApi;
struct GLVersionInfo;
+
// Encapsulates an OpenGL context, hiding platform specific management.
class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
public:
@@ -50,6 +53,9 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
// Get the underlying platform specific GL context "handle".
virtual void* GetHandle() = 0;
+ // Creates a GPUTimingClient class which abstracts various GPU Timing exts.
+ virtual scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() = 0;
+
// Gets the GLStateRestorer for the context.
GLStateRestorer* GetGLStateRestorer();
@@ -173,6 +179,7 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
class GL_EXPORT GLContextReal : public GLContext {
public:
explicit GLContextReal(GLShareGroup* share_group);
+ scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() override;
protected:
~GLContextReal() override;
@@ -180,6 +187,7 @@ class GL_EXPORT GLContextReal : public GLContext {
void SetCurrent(GLSurface* surface) override;
private:
+ scoped_ptr<gfx::GPUTiming> gpu_timing_;
DISALLOW_COPY_AND_ASSIGN(GLContextReal);
};