| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrGpuResource_DEFINED | 8 #ifndef GrGpuResource_DEFINED |
| 9 #define GrGpuResource_DEFINED | 9 #define GrGpuResource_DEFINED |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 * Called by CacheAccess. | 216 * Called by CacheAccess. |
| 217 */ | 217 */ |
| 218 void abandon(); | 218 void abandon(); |
| 219 | 219 |
| 220 virtual size_t onGpuMemorySize() const = 0; | 220 virtual size_t onGpuMemorySize() const = 0; |
| 221 | 221 |
| 222 // See comments in CacheAccess. | 222 // See comments in CacheAccess. |
| 223 bool setContentKey(const GrResourceKey& contentKey); | 223 bool setContentKey(const GrResourceKey& contentKey); |
| 224 void setBudgeted(bool countsAgainstBudget); | 224 void setBudgeted(bool countsAgainstBudget); |
| 225 void notifyIsPurgable() const; | 225 void notifyIsPurgable() const; |
| 226 void removeScratchKey(); |
| 226 | 227 |
| 227 #ifdef SK_DEBUG | 228 #ifdef SK_DEBUG |
| 228 friend class GrGpu; // for assert in GrGpu to access getGpu | 229 friend class GrGpu; // for assert in GrGpu to access getGpu |
| 229 #endif | 230 #endif |
| 230 | 231 |
| 231 static uint32_t CreateUniqueID(); | 232 static uint32_t CreateUniqueID(); |
| 232 | 233 |
| 233 // We're in an internal doubly linked list owned by GrResourceCache2 | 234 // We're in an internal doubly linked list owned by GrResourceCache2 |
| 234 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); | 235 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); |
| 235 | 236 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 265 mutable size_t fGpuMemorySize; | 266 mutable size_t fGpuMemorySize; |
| 266 | 267 |
| 267 uint32_t fFlags; | 268 uint32_t fFlags; |
| 268 const uint32_t fUniqueID; | 269 const uint32_t fUniqueID; |
| 269 | 270 |
| 270 typedef GrIORef<GrGpuResource> INHERITED; | 271 typedef GrIORef<GrGpuResource> INHERITED; |
| 271 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. | 272 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. |
| 272 }; | 273 }; |
| 273 | 274 |
| 274 #endif | 275 #endif |
| OLD | NEW |