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

Unified Diff: src/gpu/GrTracing.h

Issue 438023004: Enable gpu Debug markers if tracing category skia.gpu is enabled (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Uniquify var names Created 6 years, 4 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/GrDrawTarget.h ('k') | no next file » | 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 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
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698