Index: tools/gpu/TestContext.h |
diff --git a/tools/gpu/TestContext.h b/tools/gpu/TestContext.h |
index ffa8cae8f9d76792d8e1a924500f396efb6f0861..07673e751fed9026e4c869d433882de67622654a 100644 |
--- a/tools/gpu/TestContext.h |
+++ b/tools/gpu/TestContext.h |
@@ -13,6 +13,8 @@ |
#include "../private/SkGpuFenceSync.h" |
#include "../private/SkTemplates.h" |
+class SkGpuTimer; |
+ |
namespace sk_gpu_test { |
/** |
* An offscreen 3D context. This class is intended for Skia's internal testing needs and not |
@@ -25,6 +27,10 @@ public: |
virtual bool isValid() const = 0; |
bool fenceSyncSupport() const { return fFenceSync != nullptr; } |
+ SkGpuFenceSync* fenceSync() const { SkASSERT(fFenceSync); return fFenceSync; } |
+ |
+ bool gpuTimingSupport() const { return fGpuTimer != nullptr; } |
+ SkGpuTimer* gpuTimer() const { SkASSERT(fGpuTimer); return fGpuTimer; } |
bool getMaxGpuFrameLag(int *maxFrameLag) const { |
if (!fFenceSync) { |
@@ -73,13 +79,9 @@ public: |
/** Wait until all GPU work is finished. */ |
virtual void finish() = 0; |
- /** |
- * returns the fencesync object owned by this GLTestContext |
- */ |
- SkGpuFenceSync *fenceSync() { return fFenceSync; } |
- |
protected: |
- SkGpuFenceSync* fFenceSync; |
+ SkGpuFenceSync* fFenceSync; |
+ SkGpuTimer* fGpuTimer; |
TestContext(); |