aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/trace/SkEventTracingPriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/trace/SkEventTracingPriv.h')
-rw-r--r--tools/trace/SkEventTracingPriv.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/trace/SkEventTracingPriv.h b/tools/trace/SkEventTracingPriv.h
index 330f3f83ed..a4f04caefb 100644
--- a/tools/trace/SkEventTracingPriv.h
+++ b/tools/trace/SkEventTracingPriv.h
@@ -8,7 +8,7 @@
#ifndef SkEventTracingPriv_DEFINED
#define SkEventTracingPriv_DEFINED
-#include "SkTypes.h"
+#include "SkMutex.h"
/**
* Construct and install an SkEventTracer, based on the 'trace' command line argument.
@@ -19,4 +19,27 @@
*/
void initializeEventTracingForTools(int32_t* threadsFlag);
+/**
+ * Helper class used by internal implementations of SkEventTracer to manage categories.
+ */
+class SkEventTracingCategories {
+public:
+ SkEventTracingCategories() : fNumCategories(0) {}
+
+ uint8_t* getCategoryGroupEnabled(const char* name);
+ const char* getCategoryGroupName(const uint8_t* categoryEnabledFlag);
+
+private:
+ enum { kMaxCategories = 256 };
+
+ struct CategoryState {
+ uint8_t fEnabled;
+ const char* fName;
+ };
+
+ CategoryState fCategories[kMaxCategories];
+ int fNumCategories;
+ SkMutex fMutex;
+};
+
#endif