| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 */ | 200 */ |
| 201 const SkData* setCustomData(const SkData* data); | 201 const SkData* setCustomData(const SkData* data); |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * Returns the custom data object that was attached to this resource by | 204 * Returns the custom data object that was attached to this resource by |
| 205 * calling setCustomData. | 205 * calling setCustomData. |
| 206 */ | 206 */ |
| 207 const SkData* getCustomData() const { return fData.get(); } | 207 const SkData* getCustomData() const { return fData.get(); } |
| 208 | 208 |
| 209 /** | 209 /** |
| 210 * Internal-only helper class used for cache manipulations of the reosurce. | 210 * Internal-only helper class used for manipulations of the resource by the
cache. |
| 211 */ | 211 */ |
| 212 class CacheAccess; | 212 class CacheAccess; |
| 213 inline CacheAccess cacheAccess(); | 213 inline CacheAccess cacheAccess(); |
| 214 inline const CacheAccess cacheAccess() const; | 214 inline const CacheAccess cacheAccess() const; |
| 215 | 215 |
| 216 /** | 216 /** |
| 217 * Internal-only helper class used for manipulations of the resource by inte
rnal code. |
| 218 */ |
| 219 class ResourcePriv; |
| 220 inline ResourcePriv resourcePriv(); |
| 221 inline const ResourcePriv resourcePriv() const; |
| 222 |
| 223 /** |
| 217 * Removes references to objects in the underlying 3D API without freeing th
em. | 224 * Removes references to objects in the underlying 3D API without freeing th
em. |
| 218 * Called by CacheAccess. | 225 * Called by CacheAccess. |
| 219 * In general this method should not be called outside of skia. It was | 226 * In general this method should not be called outside of skia. It was |
| 220 * made by public for a special case where it needs to be called in Blink | 227 * made by public for a special case where it needs to be called in Blink |
| 221 * when a texture becomes unsafe to use after having been shared through | 228 * when a texture becomes unsafe to use after having been shared through |
| 222 * a texture mailbox. | 229 * a texture mailbox. |
| 223 */ | 230 */ |
| 224 void abandon(); | 231 void abandon(); |
| 225 | 232 |
| 226 protected: | 233 protected: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 LifeCycle fLifeCycle; | 299 LifeCycle fLifeCycle; |
| 293 const uint32_t fUniqueID; | 300 const uint32_t fUniqueID; |
| 294 | 301 |
| 295 SkAutoTUnref<const SkData> fData; | 302 SkAutoTUnref<const SkData> fData; |
| 296 | 303 |
| 297 typedef GrIORef<GrGpuResource> INHERITED; | 304 typedef GrIORef<GrGpuResource> INHERITED; |
| 298 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. | 305 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. |
| 299 }; | 306 }; |
| 300 | 307 |
| 301 #endif | 308 #endif |
| OLD | NEW |