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

Unified Diff: ui/gl/gl_context.cc

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_context.h ('k') | ui/gl/gpu_timing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index 720e8e23513c534efe37bea129a11d5fd4831c52..dd8aa266f5081559b0189a8a6a41fb76736e5f98 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -15,6 +15,7 @@
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/gl_version_info.h"
+#include "ui/gl/gpu_timing.h"
namespace gfx {
@@ -212,6 +213,13 @@ void GLContext::SetRealGLApi() {
GLContextReal::GLContextReal(GLShareGroup* share_group)
: GLContext(share_group) {}
+scoped_refptr<gfx::GPUTimingClient> GLContextReal::CreateGPUTimingClient() {
+ if (!gpu_timing_) {
+ gpu_timing_.reset(new gfx::GPUTiming(this));
+ }
+ return gpu_timing_->CreateGPUTimingClient();
+}
+
GLContextReal::~GLContextReal() {}
void GLContextReal::SetCurrent(GLSurface* surface) {
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gpu_timing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698