Index: ui/gl/gl_context.h |
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h |
index 5eac8383f38d40c5afc67a560ea3566208735327..4577be31cc370673742358c8b76fe465bb15c702 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); |
}; |