Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 95e0d51cf8979dae8c9a6eaf7cfbd9956d42c540..b701e9e9dc30308a9ad047ebdf52d57ecc67adf1 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -110,7 +110,15 @@ GrContext::GrContext() { |
fOvalRenderer = NULL; |
fViewMatrix.reset(); |
fMaxTextureSizeOverride = 1 << 20; |
- fGpuTracingEnabled = false; |
+ |
+ // Check if the gpu.serivce category is set from tracing and enable GpuTracing if it is |
bsalomon
2014/08/04 15:22:05
Is it really right to do this only when the GrCont
|
+ const unsigned char *category_enabled = TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED( |
+ TRACE_DISABLED_BY_DEFAULT("gpu.service")); |
+ if (*category_enabled != 0) { |
+ fGpuTracingEnabled = true; |
+ } else { |
+ fGpuTracingEnabled = false; |
+ } |
} |
bool GrContext::init(GrBackend backend, GrBackendContext backendContext) { |