Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Side by Side Diff: src/gpu/GrResourceCache.h

Issue 32523004: GrTHashCache -> GrTHashTable (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: no-find-copies Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrTHashCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #ifndef GrResourceCache_DEFINED 11 #ifndef GrResourceCache_DEFINED
12 #define GrResourceCache_DEFINED 12 #define GrResourceCache_DEFINED
13 13
14 #include "GrConfig.h" 14 #include "GrConfig.h"
15 #include "GrTypes.h" 15 #include "GrTypes.h"
16 #include "GrTHashCache.h" 16 #include "GrTHashTable.h"
17 #include "GrBinHashKey.h" 17 #include "GrBinHashKey.h"
18 #include "SkTInternalLList.h" 18 #include "SkTInternalLList.h"
19 19
20 class GrResource; 20 class GrResource;
21 class GrResourceEntry; 21 class GrResourceEntry;
22 22
23 class GrResourceKey { 23 class GrResourceKey {
24 public: 24 public:
25 enum { 25 enum {
26 kHashBits = 7, 26 kHashBits = 7,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 bool GrResourceKey::LT(const GrResourceEntry& a, const GrResourceEntry& b) { 179 bool GrResourceKey::LT(const GrResourceEntry& a, const GrResourceEntry& b) {
180 return LT(a.key(), b.key()); 180 return LT(a.key(), b.key());
181 } 181 }
182 182
183 bool GrResourceKey::EQ(const GrResourceEntry& a, const GrResourceEntry& b) { 183 bool GrResourceKey::EQ(const GrResourceEntry& a, const GrResourceEntry& b) {
184 return EQ(a.key(), b.key()); 184 return EQ(a.key(), b.key());
185 } 185 }
186 186
187 /////////////////////////////////////////////////////////////////////////////// 187 ///////////////////////////////////////////////////////////////////////////////
188 188
189 #include "GrTHashCache.h"
190
191 /** 189 /**
192 * Cache of GrResource objects. 190 * Cache of GrResource objects.
193 * 191 *
194 * These have a corresponding GrResourceKey, built from 128bits identifying the 192 * These have a corresponding GrResourceKey, built from 128bits identifying the
195 * resource. 193 * resource.
196 * 194 *
197 * The cache stores the entries in a double-linked list, which is its LRU. 195 * The cache stores the entries in a double-linked list, which is its LRU.
198 * When an entry is "locked" (i.e. given to the caller), it is moved to the 196 * When an entry is "locked" (i.e. given to the caller), it is moved to the
199 * head of the list. If/when we must purge some of the entries, we walk the 197 * head of the list. If/when we must purge some of the entries, we walk the
200 * list backwards from the tail, since those are the least recently used. 198 * list backwards from the tail, since those are the least recently used.
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 GrResourceCache* fCache; 415 GrResourceCache* fCache;
418 }; 416 };
419 #else 417 #else
420 class GrAutoResourceCacheValidate { 418 class GrAutoResourceCacheValidate {
421 public: 419 public:
422 GrAutoResourceCacheValidate(GrResourceCache*) {} 420 GrAutoResourceCacheValidate(GrResourceCache*) {}
423 }; 421 };
424 #endif 422 #endif
425 423
426 #endif 424 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrTHashCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698