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

Unified Diff: src/gpu/GrContext.cpp

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: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698