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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 friend class GrContext; // to set the above field. | 128 friend class GrContext; // to set the above field. |
129 friend class GrResourceCache; // to check the above field. | 129 friend class GrResourceCache; // to check the above field. |
130 friend class GrResourceCache2; // to check the above field. | 130 friend class GrResourceCache2; // to check the above field. |
131 | 131 |
132 template <typename, GrIOType> friend class GrPendingIOResource; | 132 template <typename, GrIOType> friend class GrPendingIOResource; |
133 }; | 133 }; |
134 | 134 |
135 /** | 135 /** |
136 * Base class for objects that can be kept in the GrResourceCache. | 136 * Base class for objects that can be kept in the GrResourceCache. |
137 */ | 137 */ |
138 class GrGpuResource : public GrIORef<GrGpuResource> { | 138 class SK_API GrGpuResource : public GrIORef<GrGpuResource> { |
139 public: | 139 public: |
140 SK_DECLARE_INST_COUNT(GrGpuResource) | 140 SK_DECLARE_INST_COUNT(GrGpuResource) |
141 | 141 |
142 /** | 142 /** |
143 * Frees the object in the underlying 3D API. It must be safe to call this | 143 * Frees the object in the underlying 3D API. It must be safe to call this |
144 * when the object has been previously abandoned. | 144 * when the object has been previously abandoned. |
145 */ | 145 */ |
146 void release(); | 146 void release(); |
147 | 147 |
148 /** | 148 /** |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache | 260 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache |
261 const uint32_t fUniqueID; | 261 const uint32_t fUniqueID; |
262 | 262 |
263 GrResourceKey fScratchKey; | 263 GrResourceKey fScratchKey; |
264 | 264 |
265 typedef GrIORef<GrGpuResource> INHERITED; | 265 typedef GrIORef<GrGpuResource> INHERITED; |
266 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. | 266 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. |
267 }; | 267 }; |
268 | 268 |
269 #endif | 269 #endif |
OLD | NEW |