OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrTest.h" | 8 #include "GrTest.h" |
9 | 9 |
10 #include "GrBatchAtlas.h" | 10 #include "GrBatchAtlas.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 out->appendf("Transfers to Texture: %d\n", fTransfersToTexture); | 181 out->appendf("Transfers to Texture: %d\n", fTransfersToTexture); |
182 out->appendf("Stencil Buffer Creates: %d\n", fStencilAttachmentCreates); | 182 out->appendf("Stencil Buffer Creates: %d\n", fStencilAttachmentCreates); |
183 out->appendf("Number of draws: %d\n", fNumDraws); | 183 out->appendf("Number of draws: %d\n", fNumDraws); |
184 } | 184 } |
185 | 185 |
186 void GrGpu::Stats::dumpKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>*
values) { | 186 void GrGpu::Stats::dumpKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>*
values) { |
187 keys->push_back(SkString("render_target_binds")); values->push_back(fRenderT
argetBinds); | 187 keys->push_back(SkString("render_target_binds")); values->push_back(fRenderT
argetBinds); |
188 keys->push_back(SkString("shader_compilations")); values->push_back(fShaderC
ompilations); | 188 keys->push_back(SkString("shader_compilations")); values->push_back(fShaderC
ompilations); |
189 keys->push_back(SkString("texture_uploads")); values->push_back(fTextureUplo
ads); | 189 keys->push_back(SkString("texture_uploads")); values->push_back(fTextureUplo
ads); |
190 keys->push_back(SkString("number_of_draws")); values->push_back(fNumDraws); | 190 keys->push_back(SkString("number_of_draws")); values->push_back(fNumDraws); |
| 191 keys->push_back(SkString("number_of_failed_draws")); values->push_back(fNumF
ailedDraws); |
191 } | 192 } |
192 | 193 |
193 #endif | 194 #endif |
194 | 195 |
195 #if GR_CACHE_STATS | 196 #if GR_CACHE_STATS |
196 void GrResourceCache::getStats(Stats* stats) const { | 197 void GrResourceCache::getStats(Stats* stats) const { |
197 stats->reset(); | 198 stats->reset(); |
198 | 199 |
199 stats->fTotal = this->getResourceCount(); | 200 stats->fTotal = this->getResourceCount(); |
200 stats->fNumNonPurgeable = fNonpurgeableResources.count(); | 201 stats->fNumNonPurgeable = fNonpurgeableResources.count(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 SkASSERT(nullptr == fGpu); | 414 SkASSERT(nullptr == fGpu); |
414 fGpu = new MockGpu(this, options); | 415 fGpu = new MockGpu(this, options); |
415 SkASSERT(fGpu); | 416 SkASSERT(fGpu); |
416 this->initCommon(options); | 417 this->initCommon(options); |
417 | 418 |
418 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 419 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
419 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 420 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
420 // resources in the buffer pools. | 421 // resources in the buffer pools. |
421 fDrawingManager->abandon(); | 422 fDrawingManager->abandon(); |
422 } | 423 } |
OLD | NEW |