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

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

Issue 891973002: Add texture create/upload stats and make nanobench have explicit gpu stats flag (Closed) Base URL: https://skia.googlesource.com/skia.git@lala
Patch Set: rebase Created 5 years, 10 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.cpp ('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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void GrContext::printGpuStats() const { 62 void GrContext::printGpuStats() const {
63 SkString out; 63 SkString out;
64 this->dumpGpuStats(&out); 64 this->dumpGpuStats(&out);
65 SkDebugf(out.c_str()); 65 SkDebugf(out.c_str());
66 } 66 }
67 67
68 #if GR_GPU_STATS 68 #if GR_GPU_STATS
69 void GrGpu::Stats::dump(SkString* out) { 69 void GrGpu::Stats::dump(SkString* out) {
70 out->appendf("Render Target Binds: %d\n", fRenderTargetBinds); 70 out->appendf("Render Target Binds: %d\n", fRenderTargetBinds);
71 out->appendf("Shader Compilations: %d\n", fShaderCompilations); 71 out->appendf("Shader Compilations: %d\n", fShaderCompilations);
72 out->appendf("Textures Created: %d\n", fTextureCreates);
73 out->appendf("Texture Uploads: %d\n", fTextureUploads);
72 } 74 }
73 #endif 75 #endif
74 76
75 #if GR_CACHE_STATS 77 #if GR_CACHE_STATS
76 void GrResourceCache2::dumpStats(SkString* out) const { 78 void GrResourceCache2::dumpStats(SkString* out) const {
77 this->validate(); 79 this->validate();
78 80
79 int locked = 0; 81 int locked = 0;
80 int scratch = 0; 82 int scratch = 0;
81 int wrapped = 0; 83 int wrapped = 0;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // these objects are required for any of tests that use this context. TODO: make stop allocating 256 // these objects are required for any of tests that use this context. TODO: make stop allocating
255 // resources in the buffer pools. 257 // resources in the buffer pools.
256 SkDELETE(fDrawBuffer); 258 SkDELETE(fDrawBuffer);
257 SkDELETE(fDrawBufferVBAllocPool); 259 SkDELETE(fDrawBufferVBAllocPool);
258 SkDELETE(fDrawBufferIBAllocPool); 260 SkDELETE(fDrawBufferIBAllocPool);
259 261
260 fDrawBuffer = NULL; 262 fDrawBuffer = NULL;
261 fDrawBufferVBAllocPool = NULL; 263 fDrawBufferVBAllocPool = NULL;
262 fDrawBufferIBAllocPool = NULL; 264 fDrawBufferIBAllocPool = NULL;
263 } 265 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698