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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 */ | 256 */ |
257 void release(); | 257 void release(); |
258 | 258 |
259 virtual size_t onGpuMemorySize() const = 0; | 259 virtual size_t onGpuMemorySize() const = 0; |
260 | 260 |
261 // See comments in CacheAccess. | 261 // See comments in CacheAccess. |
262 bool setContentKey(const GrContentKey& contentKey); | 262 bool setContentKey(const GrContentKey& contentKey); |
263 void notifyIsPurgable() const; | 263 void notifyIsPurgable() const; |
264 void removeScratchKey(); | 264 void removeScratchKey(); |
265 void makeBudgeted(); | 265 void makeBudgeted(); |
| 266 void makeUnbudgeted(); |
266 | 267 |
267 #ifdef SK_DEBUG | 268 #ifdef SK_DEBUG |
268 friend class GrGpu; // for assert in GrGpu to access getGpu | 269 friend class GrGpu; // for assert in GrGpu to access getGpu |
269 #endif | 270 #endif |
270 | 271 |
271 static uint32_t CreateUniqueID(); | 272 static uint32_t CreateUniqueID(); |
272 | 273 |
273 // We're in an internal doubly linked list owned by GrResourceCache2 | 274 // We're in an internal doubly linked list owned by GrResourceCache2 |
274 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); | 275 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); |
275 | 276 |
(...skipping 10 matching lines...) Expand all Loading... |
286 LifeCycle fLifeCycle; | 287 LifeCycle fLifeCycle; |
287 const uint32_t fUniqueID; | 288 const uint32_t fUniqueID; |
288 | 289 |
289 SkAutoTUnref<const SkData> fData; | 290 SkAutoTUnref<const SkData> fData; |
290 | 291 |
291 typedef GrIORef<GrGpuResource> INHERITED; | 292 typedef GrIORef<GrGpuResource> INHERITED; |
292 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. | 293 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. |
293 }; | 294 }; |
294 | 295 |
295 #endif | 296 #endif |
OLD | NEW |