Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: tools/gpu/TestContext.cpp

Issue 2388433003: skpbench: add option for gpu timing (Closed)
Patch Set: SkAutoTDelete Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/TestContext.h ('k') | tools/gpu/gl/GLTestContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/TestContext.cpp
diff --git a/tools/gpu/TestContext.cpp b/tools/gpu/TestContext.cpp
index 8a78b903b15fbefe8507fa9210fa02448b8dd22e..90aba438804c80f9418e8e4a6eb52d1b3f53588b 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();
}
}
« no previous file with comments | « tools/gpu/TestContext.h ('k') | tools/gpu/gl/GLTestContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698