diff options
author | 2016-10-04 12:33:44 -0700 | |
---|---|---|
committer | 2016-10-04 12:33:44 -0700 | |
commit | c06720d06faab3b01eba1b8693e0ac791f06dc96 (patch) | |
tree | 65e68119ef1d128aeb4bff876c8ae814306c3a81 /tools/gpu/TestContext.h | |
parent | b3f543d955637c6e10d7109554b5a46c6e25291a (diff) |
skpbench: add option for gpu timing
Adds a gpu timing option with a GL implementation.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2388433003
Review-Url: https://codereview.chromium.org/2388433003
Diffstat (limited to 'tools/gpu/TestContext.h')
-rw-r--r-- | tools/gpu/TestContext.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/gpu/TestContext.h b/tools/gpu/TestContext.h index d01cb02af2..d39b7446c6 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; + FenceSync* fFenceSync; + GpuTimer* fGpuTimer; TestContext(); |