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(); |