| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 213 } |
| 214 if (resource->cacheAccess().isExternal()) { | 214 if (resource->cacheAccess().isExternal()) { |
| 215 ++fExternal; | 215 ++fExternal; |
| 216 } | 216 } |
| 217 if (resource->cacheAccess().isBorrowed()) { | 217 if (resource->cacheAccess().isBorrowed()) { |
| 218 ++fBorrowed; | 218 ++fBorrowed; |
| 219 } | 219 } |
| 220 if (resource->cacheAccess().isAdopted()) { | 220 if (resource->cacheAccess().isAdopted()) { |
| 221 ++fAdopted; | 221 ++fAdopted; |
| 222 } | 222 } |
| 223 if (!resource->resourcePriv().isBudgeted()) { | 223 if (SkBudgeted::kNo == 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 | 232 |
| 233 void dumpStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* valu
e) const; | 233 void dumpStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* valu
e) const; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 431 |
| 432 friend class GrGpuResource; // To access all the proxy inline methods. | 432 friend class GrGpuResource; // To access all the proxy inline methods. |
| 433 friend class GrResourceCache; // To create this type. | 433 friend class GrResourceCache; // To create this type. |
| 434 }; | 434 }; |
| 435 | 435 |
| 436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { | 436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { |
| 437 return ResourceAccess(this); | 437 return ResourceAccess(this); |
| 438 } | 438 } |
| 439 | 439 |
| 440 #endif | 440 #endif |
| OLD | NEW |