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

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

Issue 1457123002: Make block size a template parameter of SkTLList (Closed) Base URL: https://skia.googlesource.com/skia.git@forward
Patch Set: another missing typename Created 5 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 | « src/gpu/GrReducedClip.h ('k') | src/gpu/batches/GrDrawPathBatch.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 * 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 GrStencilAndCoverTextContext_DEFINED 8 #ifndef GrStencilAndCoverTextContext_DEFINED
9 #define GrStencilAndCoverTextContext_DEFINED 9 #define GrStencilAndCoverTextContext_DEFINED
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 int fTotalGlyphCount; 86 int fTotalGlyphCount;
87 SkAutoTUnref<GrPathRangeDraw> fDraw; 87 SkAutoTUnref<GrPathRangeDraw> fDraw;
88 SkAutoTUnref<const SkTextBlob> fFallbackTextBlob; 88 SkAutoTUnref<const SkTextBlob> fFallbackTextBlob;
89 mutable SkGlyphCache* fDetachedGlyphCache; 89 mutable SkGlyphCache* fDetachedGlyphCache;
90 mutable uint32_t fLastDrawnGlyphsID; 90 mutable uint32_t fLastDrawnGlyphsID;
91 mutable SkMatrix fLocalMatrixTemplate; 91 mutable SkMatrix fLocalMatrixTemplate;
92 }; 92 };
93 93
94 // Text blobs/caches. 94 // Text blobs/caches.
95 95
96 class TextBlob : public SkTLList<TextRun> { 96 class TextBlob : public SkTLList<TextRun, 1> {
97 public: 97 public:
98 typedef SkTArray<uint32_t, true> Key; 98 typedef SkTArray<uint32_t, true> Key;
99 99
100 static const Key& GetKey(const TextBlob* blob) { return blob->key(); } 100 static const Key& GetKey(const TextBlob* blob) { return blob->key(); }
101 101
102 static uint32_t Hash(const Key& key) { 102 static uint32_t Hash(const Key& key) {
103 SkASSERT(key.count() > 1); // 1-length keys should be using the blob -id hash map. 103 SkASSERT(key.count() > 1); // 1-length keys should be using the blob -id hash map.
104 return SkChecksum::Murmur3(key.begin(), sizeof(uint32_t) * key.count ()); 104 return SkChecksum::Murmur3(key.begin(), sizeof(uint32_t) * key.count ());
105 } 105 }
106 106
(...skipping 25 matching lines...) Expand all
132 132
133 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; 133 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache;
134 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; 134 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache;
135 SkTInternalLList<TextBlob> fLRUList; 135 SkTInternalLList<TextBlob> fLRUList;
136 size_t fCacheSize; 136 size_t fCacheSize;
137 137
138 typedef GrTextContext INHERITED; 138 typedef GrTextContext INHERITED;
139 }; 139 };
140 140
141 #endif 141 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrReducedClip.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698