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

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: Merged with latest 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
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index 720e8e23513c534efe37bea129a11d5fd4831c52..3feecf54f7b9c6193668197dec6a7cb89cdd94af 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 {
@@ -112,6 +113,13 @@ const GLVersionInfo* GLContext::GetVersionInfo() {
return version_info_.get();
}
+gpu::GPUTiming* GLContext::GetGPUTiming() {
+ if (!gpu_timing_) {
+ gpu_timing_ = make_scoped_ptr(new gpu::GPUTiming(this));
piman 2015/02/25 01:00:52 nit, shorter: gpu_timing_.reset(new gpu::GPUTiming
David Yen 2015/02/25 01:47:35 Done.
+ }
+ return gpu_timing_.get();
+}
+
GLShareGroup* GLContext::share_group() {
return share_group_.get();
}

Powered by Google App Engine
This is Rietveld 408576698