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

Unified Diff: src/gpu/GrTracing.h

Issue 1565113004: Change to wire up opnames in SkGpuDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@audittrail-initial
Patch Set: add a bunch of macros to interact with GrAuditTrail Created 4 years, 11 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 | « src/gpu/GrAuditTrail.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTracing.h
diff --git a/src/gpu/GrTracing.h b/src/gpu/GrTracing.h
index 33d7f82ccbfd8d6948bf01f6020f69c7c246253e..4cdcace6ff409f969266ad8576139d869e038122 100644
--- a/src/gpu/GrTracing.h
+++ b/src/gpu/GrTracing.h
@@ -86,16 +86,18 @@ private:
GrGpuTraceMarkerGenerator SK_MACRO_APPEND_LINE(TMG)(target); \
SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \
-#define GR_CREATE_TRACE_MARKER_CONTEXT(name, context) \
+#define GR_CREATE_TRACE_MARKER_CONTEXT(classname, op, context) \
/* Chromium tracing */ \
static int SK_MACRO_APPEND_LINE(name_counter) = 0; \
bool SK_MACRO_APPEND_LINE(gpuTracingEnabled); \
TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), \
&SK_MACRO_APPEND_LINE(gpuTracingEnabled)); \
if (SK_MACRO_APPEND_LINE(gpuTracingEnabled)) { \
- INTERNAL_GR_CREATE_TRACE_MARKER_SCOPED_C(name, SK_MACRO_APPEND_LINE(name_counter), context)\
+ INTERNAL_GR_CREATE_TRACE_MARKER_SCOPED_C(classname "::" op, \
+ SK_MACRO_APPEND_LINE(name_counter), context) \
} \
- INTERNAL_TRACE_EVENT_ADD_SCOPED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), name, \
+ GR_AUDIT_TRAIL_ADDOP(context->getAuditTrail(), SkString(op)); \
+ INTERNAL_TRACE_EVENT_ADD_SCOPED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), classname "::" op, \
"id", SK_MACRO_APPEND_LINE(name_counter));
#define INTERNAL_GR_CREATE_TRACE_MARKER_SCOPED_C(name, name_counter, context) \
« no previous file with comments | « src/gpu/GrAuditTrail.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698