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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 this->dumpGpuStats(&out); | 64 this->dumpGpuStats(&out); |
65 SkDebugf("%s", out.c_str()); | 65 SkDebugf("%s", 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); | 72 out->appendf("Textures Created: %d\n", fTextureCreates); |
73 out->appendf("Texture Uploads: %d\n", fTextureUploads); | 73 out->appendf("Texture Uploads: %d\n", fTextureUploads); |
74 out->appendf("Stencil Buffer Creates: %d\n", fStencilBufferCreates); | 74 out->appendf("Stencil Buffer Creates: %d\n", fStencilAttachmentCreates); |
75 } | 75 } |
76 #endif | 76 #endif |
77 | 77 |
78 #if GR_CACHE_STATS | 78 #if GR_CACHE_STATS |
79 void GrResourceCache::dumpStats(SkString* out) const { | 79 void GrResourceCache::dumpStats(SkString* out) const { |
80 this->validate(); | 80 this->validate(); |
81 | 81 |
82 int locked = fNonpurgeableResources.count(); | 82 int locked = fNonpurgeableResources.count(); |
83 | 83 |
84 struct Stats { | 84 struct Stats { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 bool onWriteTexturePixels(GrTexture* texture, | 226 bool onWriteTexturePixels(GrTexture* texture, |
227 int left, int top, int width, int height, | 227 int left, int top, int width, int height, |
228 GrPixelConfig config, const void* buffer, | 228 GrPixelConfig config, const void* buffer, |
229 size_t rowBytes) override { | 229 size_t rowBytes) override { |
230 return false; | 230 return false; |
231 } | 231 } |
232 | 232 |
233 void onResolveRenderTarget(GrRenderTarget* target) override { return; } | 233 void onResolveRenderTarget(GrRenderTarget* target) override { return; } |
234 | 234 |
235 bool createStencilBufferForRenderTarget(GrRenderTarget*, int width, int heig
ht) override { | 235 bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int width, int
height) override { |
236 return false; | 236 return false; |
237 } | 237 } |
238 | 238 |
239 bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTarget*) ov
erride { | 239 bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrRenderTar
get*) override { |
240 return false; | 240 return false; |
241 } | 241 } |
242 | 242 |
243 void clearStencil(GrRenderTarget* target) override {} | 243 void clearStencil(GrRenderTarget* target) override {} |
244 | 244 |
245 void didAddGpuTraceMarker() override {} | 245 void didAddGpuTraceMarker() override {} |
246 | 246 |
247 void didRemoveGpuTraceMarker() override {} | 247 void didRemoveGpuTraceMarker() override {} |
248 | 248 |
249 typedef GrGpu INHERITED; | 249 typedef GrGpu INHERITED; |
(...skipping 16 matching lines...) Expand all Loading... |
266 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 266 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
267 // resources in the buffer pools. | 267 // resources in the buffer pools. |
268 SkDELETE(fDrawBuffer); | 268 SkDELETE(fDrawBuffer); |
269 SkDELETE(fDrawBufferVBAllocPool); | 269 SkDELETE(fDrawBufferVBAllocPool); |
270 SkDELETE(fDrawBufferIBAllocPool); | 270 SkDELETE(fDrawBufferIBAllocPool); |
271 | 271 |
272 fDrawBuffer = NULL; | 272 fDrawBuffer = NULL; |
273 fDrawBufferVBAllocPool = NULL; | 273 fDrawBufferVBAllocPool = NULL; |
274 fDrawBufferIBAllocPool = NULL; | 274 fDrawBufferIBAllocPool = NULL; |
275 } | 275 } |
OLD | NEW |