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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 for (int i = 0; i < fPurgeableQueue.count(); ++i) { | 110 for (int i = 0; i < fPurgeableQueue.count(); ++i) { |
111 stats.update(fPurgeableQueue.at(i)); | 111 stats.update(fPurgeableQueue.at(i)); |
112 } | 112 } |
113 | 113 |
114 float countUtilization = (100.f * fBudgetedCount) / fMaxCount; | 114 float countUtilization = (100.f * fBudgetedCount) / fMaxCount; |
115 float byteUtilization = (100.f * fBudgetedBytes) / fMaxBytes; | 115 float byteUtilization = (100.f * fBudgetedBytes) / fMaxBytes; |
116 | 116 |
117 out->appendf("Budget: %d items %d bytes\n", fMaxCount, (int)fMaxBytes); | 117 out->appendf("Budget: %d items %d bytes\n", fMaxCount, (int)fMaxBytes); |
118 out->appendf("\t\tEntry Count: current %d" | 118 out->appendf("\t\tEntry Count: current %d" |
119 " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full),
high %d\n", | 119 " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full),
high %d\n", |
120 fCount, fBudgetedCount, stats.fWrapped, locked, stats.fScratch,
countUtilization, | 120 this->getResourceCount(), fBudgetedCount, stats.fWrapped, locke
d, stats.fScratch, |
121 fHighWaterCount); | 121 countUtilization, fHighWaterCount); |
122 out->appendf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbu
dgeted) high %d\n", | 122 out->appendf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbu
dgeted) high %d\n", |
123 SkToInt(fBytes), SkToInt(fBudgetedBytes), byteUtilization, | 123 SkToInt(fBytes), SkToInt(fBudgetedBytes), byteUtilization, |
124 SkToInt(stats.fUnbudgetedSize), SkToInt(fHighWaterBytes)); | 124 SkToInt(stats.fUnbudgetedSize), SkToInt(fHighWaterBytes)); |
125 } | 125 } |
126 | 126 |
127 #endif | 127 #endif |
128 | 128 |
129 /////////////////////////////////////////////////////////////////////////////// | 129 /////////////////////////////////////////////////////////////////////////////// |
130 | 130 |
131 void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT
imestamp; } | 131 void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT
imestamp; } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // 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 |
268 // resources in the buffer pools. | 268 // resources in the buffer pools. |
269 SkDELETE(fDrawBuffer); | 269 SkDELETE(fDrawBuffer); |
270 SkDELETE(fDrawBufferVBAllocPool); | 270 SkDELETE(fDrawBufferVBAllocPool); |
271 SkDELETE(fDrawBufferIBAllocPool); | 271 SkDELETE(fDrawBufferIBAllocPool); |
272 | 272 |
273 fDrawBuffer = NULL; | 273 fDrawBuffer = NULL; |
274 fDrawBufferVBAllocPool = NULL; | 274 fDrawBufferVBAllocPool = NULL; |
275 fDrawBufferIBAllocPool = NULL; | 275 fDrawBufferIBAllocPool = NULL; |
276 } | 276 } |
OLD | NEW |