OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 GrResourceCache* fResourceCache; | 145 GrResourceCache* fResourceCache; |
146 GrResourceKey fKey; | 146 GrResourceKey fKey; |
147 GrGpuResource* fResource; | 147 GrGpuResource* fResource; |
148 size_t fCachedSize; | 148 size_t fCachedSize; |
149 bool fIsExclusive; | 149 bool fIsExclusive; |
150 | 150 |
151 // Linked list for the LRU ordering. | 151 // Linked list for the LRU ordering. |
152 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrResourceCacheEntry); | 152 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrResourceCacheEntry); |
153 | 153 |
154 friend class GrResourceCache; | 154 friend class GrResourceCache; |
| 155 friend class GrContext; |
155 }; | 156 }; |
156 | 157 |
157 /////////////////////////////////////////////////////////////////////////////// | 158 /////////////////////////////////////////////////////////////////////////////// |
158 | 159 |
159 /** | 160 /** |
160 * Cache of GrGpuResource objects. | 161 * Cache of GrGpuResource objects. |
161 * | 162 * |
162 * These have a corresponding GrResourceKey, built from 128bits identifying the | 163 * These have a corresponding GrResourceKey, built from 128bits identifying the |
163 * resource. Multiple resources can map to same GrResourceKey. | 164 * resource. Multiple resources can map to same GrResourceKey. |
164 * | 165 * |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 GrResourceCache* fCache; | 395 GrResourceCache* fCache; |
395 }; | 396 }; |
396 #else | 397 #else |
397 class GrAutoResourceCacheValidate { | 398 class GrAutoResourceCacheValidate { |
398 public: | 399 public: |
399 GrAutoResourceCacheValidate(GrResourceCache*) {} | 400 GrAutoResourceCacheValidate(GrResourceCache*) {} |
400 }; | 401 }; |
401 #endif | 402 #endif |
402 | 403 |
403 #endif | 404 #endif |
OLD | NEW |