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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 this->internal_dispose(); | 103 this->internal_dispose(); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 private: | 107 private: |
108 mutable int32_t fRefCnt; | 108 mutable int32_t fRefCnt; |
109 mutable int32_t fPendingReads; | 109 mutable int32_t fPendingReads; |
110 mutable int32_t fPendingWrites; | 110 mutable int32_t fPendingWrites; |
111 | 111 |
112 // These functions need access to the pending read/write member functions. | 112 // These functions need access to the pending read/write member functions. |
113 friend class GrDrawState; | 113 friend class GrRODrawState; |
114 friend class GrProgramResource; | 114 friend class GrProgramResource; |
115 }; | 115 }; |
116 | 116 |
117 /** | 117 /** |
118 * Base class for objects that can be kept in the GrResourceCache. | 118 * Base class for objects that can be kept in the GrResourceCache. |
119 */ | 119 */ |
120 class GrGpuResource : public GrGpuRef { | 120 class GrGpuResource : public GrGpuRef { |
121 public: | 121 public: |
122 SK_DECLARE_INST_COUNT(GrGpuResource) | 122 SK_DECLARE_INST_COUNT(GrGpuResource) |
123 | 123 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache | 240 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache |
241 const uint32_t fUniqueID; | 241 const uint32_t fUniqueID; |
242 | 242 |
243 GrResourceKey fScratchKey; | 243 GrResourceKey fScratchKey; |
244 | 244 |
245 typedef GrGpuRef INHERITED; | 245 typedef GrGpuRef INHERITED; |
246 }; | 246 }; |
247 | 247 |
248 #endif | 248 #endif |
OLD | NEW |