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

Side by Side Diff: src/gpu/GrTest.cpp

Issue 1333543002: Add number of draws to GrGpu stats (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 | « src/gpu/GrGpu.h ('k') | 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 2013 Google Inc. 3 * Copyright 2013 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 #include "GrTest.h" 9 #include "GrTest.h"
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 SkDebugf("%s", out.c_str()); 96 SkDebugf("%s", out.c_str());
97 } 97 }
98 98
99 #if GR_GPU_STATS 99 #if GR_GPU_STATS
100 void GrGpu::Stats::dump(SkString* out) { 100 void GrGpu::Stats::dump(SkString* out) {
101 out->appendf("Render Target Binds: %d\n", fRenderTargetBinds); 101 out->appendf("Render Target Binds: %d\n", fRenderTargetBinds);
102 out->appendf("Shader Compilations: %d\n", fShaderCompilations); 102 out->appendf("Shader Compilations: %d\n", fShaderCompilations);
103 out->appendf("Textures Created: %d\n", fTextureCreates); 103 out->appendf("Textures Created: %d\n", fTextureCreates);
104 out->appendf("Texture Uploads: %d\n", fTextureUploads); 104 out->appendf("Texture Uploads: %d\n", fTextureUploads);
105 out->appendf("Stencil Buffer Creates: %d\n", fStencilAttachmentCreates); 105 out->appendf("Stencil Buffer Creates: %d\n", fStencilAttachmentCreates);
106 out->appendf("Number of draws: %d\n", fNumDraws);
106 } 107 }
107 #endif 108 #endif
108 109
109 #if GR_CACHE_STATS 110 #if GR_CACHE_STATS
110 void GrResourceCache::dumpStats(SkString* out) const { 111 void GrResourceCache::dumpStats(SkString* out) const {
111 this->validate(); 112 this->validate();
112 113
113 int locked = fNonpurgeableResources.count(); 114 int locked = fNonpurgeableResources.count();
114 115
115 struct Stats { 116 struct Stats {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 SkASSERT(nullptr == fGpu); 290 SkASSERT(nullptr == fGpu);
290 fGpu = new MockGpu(this, options); 291 fGpu = new MockGpu(this, options);
291 SkASSERT(fGpu); 292 SkASSERT(fGpu);
292 this->initCommon(); 293 this->initCommon();
293 294
294 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 295 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
295 // these objects are required for any of tests that use this context. TODO: make stop allocating 296 // these objects are required for any of tests that use this context. TODO: make stop allocating
296 // resources in the buffer pools. 297 // resources in the buffer pools.
297 fDrawingMgr.abandon(); 298 fDrawingMgr.abandon();
298 } 299 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698