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

Side by Side Diff: src/core/SkTMultiMap.h

Issue 707493002: Use GrResourceCache2 to service content key lookups (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move #ifdef SK_SUPPORT_GPU Created 6 years, 1 month 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
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrContext.cpp » ('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 2013 Google Inc. 3 * Copyright 2013 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 #ifndef SkTMultiMap_DEFINED 9 #ifndef SkTMultiMap_DEFINED
10 #define SkTMultiMap_DEFINED 10 #define SkTMultiMap_DEFINED
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (f(list->fValue)){ 95 if (f(list->fValue)){
96 return list->fValue; 96 return list->fValue;
97 } 97 }
98 list = list->fNext; 98 list = list->fNext;
99 } 99 }
100 return NULL; 100 return NULL;
101 } 101 }
102 102
103 int count() const { return fCount; } 103 int count() const { return fCount; }
104 104
105 #ifdef SK_DEBUG
106 // This is not particularly fast and only used for validation, so debug only .
107 int countForKey(const Key& key) const {
108 int count = 0;
109 ValueList* list = fHash.find(key);
110 while (list) {
111 list = list->fNext;
112 ++count;
113 }
114 return count;
115 }
116 #endif
117
105 private: 118 private:
106 SkTDynamicHash<ValueList, Key> fHash; 119 SkTDynamicHash<ValueList, Key> fHash;
107 int fCount; 120 int fCount;
108 }; 121 };
109 122
110 #endif 123 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698