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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |