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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 fResourceCache = NULL; 103 fResourceCache = NULL;
104 fFontCache = NULL; 104 fFontCache = NULL;
105 fDrawBuffer = NULL; 105 fDrawBuffer = NULL;
106 fDrawBufferVBAllocPool = NULL; 106 fDrawBufferVBAllocPool = NULL;
107 fDrawBufferIBAllocPool = NULL; 107 fDrawBufferIBAllocPool = NULL;
108 fFlushToReduceCacheSize = false; 108 fFlushToReduceCacheSize = false;
109 fAARectRenderer = NULL; 109 fAARectRenderer = NULL;
110 fOvalRenderer = NULL; 110 fOvalRenderer = NULL;
111 fViewMatrix.reset(); 111 fViewMatrix.reset();
112 fMaxTextureSizeOverride = 1 << 20; 112 fMaxTextureSizeOverride = 1 << 20;
113 fGpuTracingEnabled = false; 113
114 // Check if the gpu.serivce category is set from tracing and enable GpuTraci ng if it is
bsalomon 2014/08/04 15:22:05 Is it really right to do this only when the GrCont
115 const unsigned char *category_enabled = TRACE_EVENT_API_GET_CATEGORY_GROUP_E NABLED(
116 TRACE_DISABLED_BY_DEFAULT("gpu.service"));
117 if (*category_enabled != 0) {
118 fGpuTracingEnabled = true;
119 } else {
120 fGpuTracingEnabled = false;
121 }
114 } 122 }
115 123
116 bool GrContext::init(GrBackend backend, GrBackendContext backendContext) { 124 bool GrContext::init(GrBackend backend, GrBackendContext backendContext) {
117 SkASSERT(NULL == fGpu); 125 SkASSERT(NULL == fGpu);
118 126
119 fGpu = GrGpu::Create(backend, backendContext, this); 127 fGpu = GrGpu::Create(backend, backendContext, this);
120 if (NULL == fGpu) { 128 if (NULL == fGpu) {
121 return false; 129 return false;
122 } 130 }
123 131
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 fDrawBuffer->removeGpuTraceMarker(marker); 1928 fDrawBuffer->removeGpuTraceMarker(marker);
1921 } 1929 }
1922 } 1930 }
1923 1931
1924 /////////////////////////////////////////////////////////////////////////////// 1932 ///////////////////////////////////////////////////////////////////////////////
1925 #if GR_CACHE_STATS 1933 #if GR_CACHE_STATS
1926 void GrContext::printCacheStats() const { 1934 void GrContext::printCacheStats() const {
1927 fResourceCache->printStats(); 1935 fResourceCache->printStats();
1928 } 1936 }
1929 #endif 1937 #endif
OLDNEW
« 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