diff options
author | csmartdalton <csmartdalton@google.com> | 2016-10-04 12:33:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-04 12:33:44 -0700 |
commit | c06720d06faab3b01eba1b8693e0ac791f06dc96 (patch) | |
tree | 65e68119ef1d128aeb4bff876c8ae814306c3a81 /tools/gpu/TestContext.cpp | |
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.cpp')
-rw-r--r-- | tools/gpu/TestContext.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/gpu/TestContext.cpp b/tools/gpu/TestContext.cpp index 8a78b903b1..0857024d06 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(); } @@ -63,6 +69,7 @@ void TestContext::teardown() { delete fFenceSync; fFenceSync = nullptr; } + delete fGpuTimer; } } |