Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: ui/gl/gl_context.h

Issue 937263006: Refactored GLContext to own GPUTiming which spawn GPUTimingClients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added GPUTiming descriptions for all 3 classes, refptr in GPUTimer Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698