| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 this->dumpGpuStats(&out); | 65 this->dumpGpuStats(&out); |
| 66 SkDebugf("%s", out.c_str()); | 66 SkDebugf("%s", out.c_str()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 #if GR_GPU_STATS | 69 #if GR_GPU_STATS |
| 70 void GrGpu::Stats::dump(SkString* out) { | 70 void GrGpu::Stats::dump(SkString* out) { |
| 71 out->appendf("Render Target Binds: %d\n", fRenderTargetBinds); | 71 out->appendf("Render Target Binds: %d\n", fRenderTargetBinds); |
| 72 out->appendf("Shader Compilations: %d\n", fShaderCompilations); | 72 out->appendf("Shader Compilations: %d\n", fShaderCompilations); |
| 73 out->appendf("Textures Created: %d\n", fTextureCreates); | 73 out->appendf("Textures Created: %d\n", fTextureCreates); |
| 74 out->appendf("Texture Uploads: %d\n", fTextureUploads); | 74 out->appendf("Texture Uploads: %d\n", fTextureUploads); |
| 75 out->appendf("Stencil Buffer Creates: %d\n", fStencilBufferCreates); |
| 75 } | 76 } |
| 76 #endif | 77 #endif |
| 77 | 78 |
| 78 #if GR_CACHE_STATS | 79 #if GR_CACHE_STATS |
| 79 void GrResourceCache::dumpStats(SkString* out) const { | 80 void GrResourceCache::dumpStats(SkString* out) const { |
| 80 this->validate(); | 81 this->validate(); |
| 81 | 82 |
| 82 int locked = fNonpurgeableResources.count(); | 83 int locked = fNonpurgeableResources.count(); |
| 83 | 84 |
| 84 struct Stats { | 85 struct Stats { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 267 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
| 267 // resources in the buffer pools. | 268 // resources in the buffer pools. |
| 268 SkDELETE(fDrawBuffer); | 269 SkDELETE(fDrawBuffer); |
| 269 SkDELETE(fDrawBufferVBAllocPool); | 270 SkDELETE(fDrawBufferVBAllocPool); |
| 270 SkDELETE(fDrawBufferIBAllocPool); | 271 SkDELETE(fDrawBufferIBAllocPool); |
| 271 | 272 |
| 272 fDrawBuffer = NULL; | 273 fDrawBuffer = NULL; |
| 273 fDrawBufferVBAllocPool = NULL; | 274 fDrawBufferVBAllocPool = NULL; |
| 274 fDrawBufferIBAllocPool = NULL; | 275 fDrawBufferIBAllocPool = NULL; |
| 275 } | 276 } |
| OLD | NEW |