| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 #ifndef GrResourceCache_DEFINED | 9 #ifndef GrResourceCache_DEFINED |
| 10 #define GrResourceCache_DEFINED | 10 #define GrResourceCache_DEFINED |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 } | 222 } |
| 223 if (!resource->resourcePriv().isBudgeted()) { | 223 if (!resource->resourcePriv().isBudgeted()) { |
| 224 fUnbudgetedSize += resource->gpuMemorySize(); | 224 fUnbudgetedSize += resource->gpuMemorySize(); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 void getStats(Stats*) const; | 229 void getStats(Stats*) const; |
| 230 | 230 |
| 231 void dumpStats(SkString*) const; | 231 void dumpStats(SkString*) const; |
| 232 |
| 233 void dumpStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* valu
e) const; |
| 232 #endif | 234 #endif |
| 233 | 235 |
| 234 // This function is for unit testing and is only defined in test tools. | 236 // This function is for unit testing and is only defined in test tools. |
| 235 void changeTimestamp(uint32_t newTimestamp); | 237 void changeTimestamp(uint32_t newTimestamp); |
| 236 | 238 |
| 237 // Enumerates all cached resources and dumps their details to traceMemoryDum
p. | 239 // Enumerates all cached resources and dumps their details to traceMemoryDum
p. |
| 238 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; | 240 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; |
| 239 | 241 |
| 240 private: | 242 private: |
| 241 /////////////////////////////////////////////////////////////////////////// | 243 /////////////////////////////////////////////////////////////////////////// |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 431 |
| 430 friend class GrGpuResource; // To access all the proxy inline methods. | 432 friend class GrGpuResource; // To access all the proxy inline methods. |
| 431 friend class GrResourceCache; // To create this type. | 433 friend class GrResourceCache; // To create this type. |
| 432 }; | 434 }; |
| 433 | 435 |
| 434 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { | 436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { |
| 435 return ResourceAccess(this); | 437 return ResourceAccess(this); |
| 436 } | 438 } |
| 437 | 439 |
| 438 #endif | 440 #endif |
| OLD | NEW |