OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |