diff options
author | csmartdalton <csmartdalton@google.com> | 2016-10-05 08:42:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-05 08:42:03 -0700 |
commit | c6618dd1dadeac8b47b81fbee108c42cca8ab166 (patch) | |
tree | 749fdc785cffc5639d0b6d1ba375d6b9904aae83 /tools/gpu/TestContext.h | |
parent | a86952a5ef9e757832a016506709ce4827b059ec (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
Committed: https://skia.googlesource.com/skia/+/c06720d06faab3b01eba1b8693e0ac791f06dc96
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..8722a337b3 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(); |