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

Unified Diff: tools/gpu/TestContext.h

Issue 2388433003: skpbench: add option for gpu timing (Closed)
Patch Set: SkAutoTDelete Created 4 years, 2 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 | « tools/gpu/GpuTimer.h ('k') | tools/gpu/TestContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/TestContext.h
diff --git a/tools/gpu/TestContext.h b/tools/gpu/TestContext.h
index d01cb02af2ad833e256b61f5e87ba4d348bf4f7d..8722a337b3a92a62731cde805ae9100a8135f262 100644
--- a/tools/gpu/TestContext.h
+++ b/tools/gpu/TestContext.h
@@ -14,6 +14,9 @@
#include "../private/SkTemplates.h"
namespace sk_gpu_test {
+
+class GpuTimer;
+
/**
* An offscreen 3D context. This class is intended for Skia's internal testing needs and not
* for general use.
@@ -27,6 +30,9 @@ public:
bool fenceSyncSupport() const { return fFenceSync != nullptr; }
FenceSync* fenceSync() { SkASSERT(fFenceSync); return fFenceSync; }
+ bool gpuTimingSupport() const { return fGpuTimer != nullptr; }
+ GpuTimer* gpuTimer() const { SkASSERT(fGpuTimer); return fGpuTimer; }
+
bool getMaxGpuFrameLag(int *maxFrameLag) const {
if (!fFenceSync) {
return false;
@@ -75,7 +81,8 @@ public:
virtual void finish() = 0;
protected:
- FenceSync* fFenceSync;
+ SkAutoTDelete<FenceSync> fFenceSync;
+ SkAutoTDelete<GpuTimer> fGpuTimer;
TestContext();
« no previous file with comments | « tools/gpu/GpuTimer.h ('k') | tools/gpu/TestContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698