| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 #ifdef SK_DEBUG | 281 #ifdef SK_DEBUG |
| 282 friend class GrGpu; // for assert in GrGpu to access getGpu | 282 friend class GrGpu; // for assert in GrGpu to access getGpu |
| 283 #endif | 283 #endif |
| 284 // An index into a heap when this resource is purgeable or an array when not
. This is maintained | 284 // An index into a heap when this resource is purgeable or an array when not
. This is maintained |
| 285 // by the cache. | 285 // by the cache. |
| 286 int fCacheArrayIndex; | 286 int fCacheArrayIndex; |
| 287 // This value reflects how recently this resource was accessed in the cache.
This is maintained | 287 // This value reflects how recently this resource was accessed in the cache.
This is maintained |
| 288 // by the cache. | 288 // by the cache. |
| 289 uint32_t fTimestamp; | 289 uint32_t fTimestamp; |
| 290 uint32_t fExternalFlushCntWhenBecamePurgeable; |
| 290 | 291 |
| 291 static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0); | 292 static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0); |
| 292 GrScratchKey fScratchKey; | 293 GrScratchKey fScratchKey; |
| 293 GrUniqueKey fUniqueKey; | 294 GrUniqueKey fUniqueKey; |
| 294 | 295 |
| 295 // This is not ref'ed but abandon() or release() will be called before the G
rGpu object | 296 // This is not ref'ed but abandon() or release() will be called before the G
rGpu object |
| 296 // is destroyed. Those calls set will this to NULL. | 297 // is destroyed. Those calls set will this to NULL. |
| 297 GrGpu* fGpu; | 298 GrGpu* fGpu; |
| 298 mutable size_t fGpuMemorySize; | 299 mutable size_t fGpuMemorySize; |
| 299 | 300 |
| 300 SkBudgeted fBudgeted; | 301 SkBudgeted fBudgeted; |
| 301 bool fRefsWrappedObjects; | 302 bool fRefsWrappedObjects; |
| 302 const uint32_t fUniqueID; | 303 const uint32_t fUniqueID; |
| 303 | 304 |
| 304 typedef GrIORef<GrGpuResource> INHERITED; | 305 typedef GrIORef<GrGpuResource> INHERITED; |
| 305 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n
otifyRefCntIsZero. | 306 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n
otifyRefCntIsZero. |
| 306 }; | 307 }; |
| 307 | 308 |
| 308 #endif | 309 #endif |
| OLD | NEW |