Index: src/gpu/GrTracing.h |
diff --git a/src/gpu/GrTracing.h b/src/gpu/GrTracing.h |
index efe0fce4a156808ffa741cf30ce22ec3574ef0bf..3327e2c95e17d8c44bbd51f7aeaeda5e537f4688 100644 |
--- a/src/gpu/GrTracing.h |
+++ b/src/gpu/GrTracing.h |
@@ -85,14 +85,16 @@ private: |
INTERNAL_TRACE_EVENT_ADD_SCOPED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"),name, \ |
"id", name_counter, ##__VA_ARGS__); |
-#define GR_CREATE_GPU_TRACE_MARKER(name, name_counter, target) \ |
- GrGpuTraceMarkerGenerator SK_MACRO_APPEND_LINE(TMG)(target); \ |
- if (target->isGpuTracingEnabled()) { \ |
- SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \ |
+#define GR_CREATE_GPU_TRACE_MARKER(name, name_counter, target) \ |
+ GrGpuTraceMarkerGenerator SK_MACRO_APPEND_LINE(TMG)(target); \ |
+ 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)) { \ |
+ SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \ |
} |
- |
#define GR_CREATE_TRACE_MARKER_CONTEXT(name, context) \ |
INTERNAL_GR_CREATE_TRACE_MARKER_SCOPED_C(name, context) |
@@ -112,10 +114,13 @@ private: |
INTERNAL_TRACE_EVENT_ADD_SCOPED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"),name, \ |
"id", name_counter, ##__VA_ARGS__); |
-#define GR_CREATE_GPU_TRACE_MARKER_C(name, name_counter, context) \ |
- GrGpuTraceMarkerGeneratorContext SK_MACRO_APPEND_LINE(TMG)(context); \ |
- if (context->isGpuTracingEnabled()) { \ |
- SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \ |
+#define GR_CREATE_GPU_TRACE_MARKER_C(name, name_counter, context) \ |
+ GrGpuTraceMarkerGeneratorContext SK_MACRO_APPEND_LINE(TMG)(context); \ |
+ 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)) { \ |
+ SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \ |
} |
#endif |