| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 private: | 263 private: |
| 264 /** | 264 /** |
| 265 * Frees the object in the underlying 3D API. Called by CacheAccess. | 265 * Frees the object in the underlying 3D API. Called by CacheAccess. |
| 266 */ | 266 */ |
| 267 void release(); | 267 void release(); |
| 268 | 268 |
| 269 virtual size_t onGpuMemorySize() const = 0; | 269 virtual size_t onGpuMemorySize() const = 0; |
| 270 | 270 |
| 271 // See comments in CacheAccess and ResourcePriv. | 271 // See comments in CacheAccess and ResourcePriv. |
| 272 bool setUniqueKey(const GrUniqueKey&); | 272 void setUniqueKey(const GrUniqueKey&); |
| 273 void removeUniqueKey(); | 273 void removeUniqueKey(); |
| 274 void notifyIsPurgeable() const; | 274 void notifyIsPurgeable() const; |
| 275 void removeScratchKey(); | 275 void removeScratchKey(); |
| 276 void makeBudgeted(); | 276 void makeBudgeted(); |
| 277 void makeUnbudgeted(); | 277 void makeUnbudgeted(); |
| 278 | 278 |
| 279 #ifdef SK_DEBUG | 279 #ifdef SK_DEBUG |
| 280 friend class GrGpu; // for assert in GrGpu to access getGpu | 280 friend class GrGpu; // for assert in GrGpu to access getGpu |
| 281 #endif | 281 #endif |
| 282 | 282 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 301 LifeCycle fLifeCycle; | 301 LifeCycle fLifeCycle; |
| 302 const uint32_t fUniqueID; | 302 const uint32_t fUniqueID; |
| 303 | 303 |
| 304 SkAutoTUnref<const SkData> fData; | 304 SkAutoTUnref<const SkData> fData; |
| 305 | 305 |
| 306 typedef GrIORef<GrGpuResource> INHERITED; | 306 typedef GrIORef<GrGpuResource> INHERITED; |
| 307 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. | 307 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 #endif | 310 #endif |
| OLD | NEW |