diff options
author | 2016-01-12 12:59:28 -0800 | |
---|---|---|
committer | 2016-01-12 12:59:28 -0800 | |
commit | 87a721b2465c9ccfa191ce9f5012f92be7731fbc (patch) | |
tree | 3c7e0027d940d01fdde1139a305b5348d7ef36be /src/gpu/GrTracing.h | |
parent | 61a237e319a63b7ed6d38c2f3cd9b597816c3a46 (diff) |
Convert GrAuditTrail to use scoped frames
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1579193002
Review URL: https://codereview.chromium.org/1579193002
Diffstat (limited to 'src/gpu/GrTracing.h')
-rw-r--r-- | src/gpu/GrTracing.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrTracing.h b/src/gpu/GrTracing.h index 4cdcace6ff..3dbc0ef17e 100644 --- a/src/gpu/GrTracing.h +++ b/src/gpu/GrTracing.h @@ -58,7 +58,7 @@ private: /** * GR_CREATE_TRACE_MARKER will place begin and end trace markers for both * cpu and gpu (if gpu tracing enabled) for the current scope. - * marker is of type const char* and target is of type GrDrawTarget* + * name is of type const char* and target is of type GrDrawTarget* */ #define GR_CREATE_TRACE_MARKER(name, target) \ /* Chromium tracing */ \ @@ -86,6 +86,10 @@ private: GrGpuTraceMarkerGenerator SK_MACRO_APPEND_LINE(TMG)(target); \ SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \ +/** + * Context level GrTracing macros, classname and op are const char*, context is GrContext + * TODO can we just have one set of macros? Probably. + */ #define GR_CREATE_TRACE_MARKER_CONTEXT(classname, op, context) \ /* Chromium tracing */ \ static int SK_MACRO_APPEND_LINE(name_counter) = 0; \ @@ -96,7 +100,7 @@ private: INTERNAL_GR_CREATE_TRACE_MARKER_SCOPED_C(classname "::" op, \ SK_MACRO_APPEND_LINE(name_counter), context) \ } \ - GR_AUDIT_TRAIL_ADDOP(context->getAuditTrail(), SkString(op)); \ + GR_AUDIT_TRAIL_AUTO_FRAME(context->getAuditTrail(), classname "::" op); \ INTERNAL_TRACE_EVENT_ADD_SCOPED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), classname "::" op, \ "id", SK_MACRO_APPEND_LINE(name_counter)); |