diff options
author | 2016-10-05 08:42:03 -0700 | |
---|---|---|
committer | 2016-10-05 08:42:03 -0700 | |
commit | c6618dd1dadeac8b47b81fbee108c42cca8ab166 (patch) | |
tree | 749fdc785cffc5639d0b6d1ba375d6b9904aae83 /tools/gpu/TestContext.cpp | |
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.cpp')
-rw-r--r-- | tools/gpu/TestContext.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/gpu/TestContext.cpp b/tools/gpu/TestContext.cpp index 8a78b903b1..90aba43880 100644 --- a/tools/gpu/TestContext.cpp +++ b/tools/gpu/TestContext.cpp @@ -8,8 +8,13 @@ #include "TestContext.h" +#include "GpuTimer.h" + namespace sk_gpu_test { -TestContext::TestContext() : fFenceSync(nullptr), fCurrentFenceIdx(0) { +TestContext::TestContext() + : fFenceSync(nullptr) + , fGpuTimer(nullptr) + , fCurrentFenceIdx(0) { memset(fFrameFences, 0, sizeof(fFrameFences)); } @@ -21,6 +26,7 @@ TestContext::~TestContext() { } #endif SkASSERT(!fFenceSync); + SkASSERT(!fGpuTimer); } void TestContext::makeCurrent() const { this->onPlatformMakeCurrent(); } @@ -60,9 +66,9 @@ void TestContext::teardown() { fFrameFences[i] = 0; } } - delete fFenceSync; - fFenceSync = nullptr; + fFenceSync.reset(); } + fGpuTimer.reset(); } } |