aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Test.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-07-24 15:21:31 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-24 20:02:07 +0000
commitb323a5ed1f26a5b8e4e9f8f78225bdf95dc5a177 (patch)
tree6015edd7fae15488eaaa05a570499adf4d3e3bb3 /tests/Test.h
parent019ff27ac0167026f9f8f4aaec8fb6461d8ba21e (diff)
sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNC
Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/Test.h')
-rw-r--r--tests/Test.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/Test.h b/tests/Test.h
index db2552b614..c9a381eb12 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -7,10 +7,11 @@
#ifndef skiatest_Test_DEFINED
#define skiatest_Test_DEFINED
-#include "SkString.h"
#include "../tools/Registry.h"
-#include "SkTypes.h"
#include "SkClipOpPriv.h"
+#include "SkString.h"
+#include "SkTraceEvent.h"
+#include "SkTypes.h"
#if SK_SUPPORT_GPU
#include "GrContextFactory.h"
@@ -94,6 +95,11 @@ struct Test {
const char* name;
bool needsGpu;
TestProc proc;
+
+ void run(skiatest::Reporter* r, sk_gpu_test::GrContextFactory* factory) const {
+ TRACE_EVENT1("test", TRACE_FUNC, "name", this->name/*these are static*/);
+ this->proc(r, factory);
+ }
};
typedef sk_tools::Registry<Test> TestRegistry;