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

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: Remove old enable flag 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..1770e4f99f750924708c2d2e88bfd8011bc52e8a 100644
--- a/src/gpu/GrTracing.h
+++ b/src/gpu/GrTracing.h
@@ -87,7 +87,10 @@ private:
#define GR_CREATE_GPU_TRACE_MARKER(name, name_counter, target) \
GrGpuTraceMarkerGenerator SK_MACRO_APPEND_LINE(TMG)(target); \
- if (target->isGpuTracingEnabled()) { \
+ bool gpuTracingEnabled; \
bsalomon 2014/08/04 19:07:33 If we're adding var names we should either append
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), \
+ &gpuTracingEnabled); \
+ if (gpuTracingEnabled) { \
SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \
}
@@ -114,7 +117,10 @@ private:
#define GR_CREATE_GPU_TRACE_MARKER_C(name, name_counter, context) \
GrGpuTraceMarkerGeneratorContext SK_MACRO_APPEND_LINE(TMG)(context); \
- if (context->isGpuTracingEnabled()) { \
+ bool gpuTracingEnabled; \
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), \
+ &gpuTracingEnabled); \
+ if (gpuTracingEnabled) { \
SK_MACRO_APPEND_LINE(TMG).initialize(name, &name_counter); \
}
« 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