aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/trace/SkDebugfTracer.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-07-21 11:06:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-21 16:38:23 +0000
commit65e4c614f0edbcf8d05bfc2a25a6e60d277fb7df (patch)
tree4fac7baec4b6f5ace655263b65262a23cefc8f4d /tools/trace/SkDebugfTracer.h
parent57aa367aa3c5911cd4a21230799b147e44190282 (diff)
Add category support to JSON and SkDebugf tracing
Bug: skia: Change-Id: I4d0bdb9d954e49b79ace0552d7b74b36a512c00d Reviewed-on: https://skia-review.googlesource.com/25642 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/trace/SkDebugfTracer.h')
-rw-r--r--tools/trace/SkDebugfTracer.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/trace/SkDebugfTracer.h b/tools/trace/SkDebugfTracer.h
index 4350d1ac3c..ca049d707b 100644
--- a/tools/trace/SkDebugfTracer.h
+++ b/tools/trace/SkDebugfTracer.h
@@ -9,6 +9,7 @@
#define SkDebugfTracer_DEFINED
#include "SkEventTracer.h"
+#include "SkEventTracingPriv.h"
#include "SkString.h"
/**
@@ -32,16 +33,18 @@ public:
const char* name,
SkEventTracer::Handle handle) override;
- const uint8_t* getCategoryGroupEnabled(const char* name) override;
+ const uint8_t* getCategoryGroupEnabled(const char* name) override {
+ return fCategories.getCategoryGroupEnabled(name);
+ }
const char* getCategoryGroupName(const uint8_t* categoryEnabledFlag) override {
- static const char* category = "category?";
- return category;
+ return fCategories.getCategoryGroupName(categoryEnabledFlag);
}
private:
SkString fIndent;
int fCnt = 0;
+ SkEventTracingCategories fCategories;
};
#endif