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

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

Issue 14940018: we only need one fontmetrics, since the paint (and fontcache) now know explicitly (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | « no previous file | src/core/SkGlyphCache.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #ifndef SkGlyphCache_DEFINED 10 #ifndef SkGlyphCache_DEFINED
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 this will trigger that. 88 this will trigger that.
89 */ 89 */
90 const void* findImage(const SkGlyph&); 90 const void* findImage(const SkGlyph&);
91 /** Return the Path associated with the glyph. If it has not been generated 91 /** Return the Path associated with the glyph. If it has not been generated
92 this will trigger that. 92 this will trigger that.
93 */ 93 */
94 const SkPath* findPath(const SkGlyph&); 94 const SkPath* findPath(const SkGlyph&);
95 95
96 /** Return the vertical metrics for this strike. 96 /** Return the vertical metrics for this strike.
97 */ 97 */
98 const SkPaint::FontMetrics& getFontMetricsY() const { 98 const SkPaint::FontMetrics& getFontMetrics() const {
99 return fFontMetricsY; 99 return fFontMetrics;
100 } 100 }
101 101
102 const SkDescriptor& getDescriptor() const { return *fDesc; } 102 const SkDescriptor& getDescriptor() const { return *fDesc; }
103 103
104 SkMask::Format getMaskFormat() const { 104 SkMask::Format getMaskFormat() const {
105 return fScalerContext->getMaskFormat(); 105 return fScalerContext->getMaskFormat();
106 } 106 }
107 107
108 bool isSubpixel() const { 108 bool isSubpixel() const {
109 return fScalerContext->isSubpixel(); 109 return fScalerContext->isSubpixel();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (*head) { 213 if (*head) {
214 (*head)->fPrev = this; 214 (*head)->fPrev = this;
215 fNext = *head; 215 fNext = *head;
216 } 216 }
217 *head = this; 217 *head = this;
218 } 218 }
219 219
220 SkGlyphCache* fNext, *fPrev; 220 SkGlyphCache* fNext, *fPrev;
221 SkDescriptor* fDesc; 221 SkDescriptor* fDesc;
222 SkScalerContext* fScalerContext; 222 SkScalerContext* fScalerContext;
223 SkPaint::FontMetrics fFontMetricsY; 223 SkPaint::FontMetrics fFontMetrics;
224 224
225 enum { 225 enum {
226 kHashBits = 12, 226 kHashBits = 12,
227 kHashCount = 1 << kHashBits, 227 kHashCount = 1 << kHashBits,
228 kHashMask = kHashCount - 1 228 kHashMask = kHashCount - 1
229 }; 229 };
230 SkGlyph* fGlyphHash[kHashCount]; 230 SkGlyph* fGlyphHash[kHashCount];
231 SkTDArray<SkGlyph*> fGlyphArray; 231 SkTDArray<SkGlyph*> fGlyphArray;
232 SkChunkAlloc fGlyphAlloc; 232 SkChunkAlloc fGlyphAlloc;
233 SkChunkAlloc fImageAlloc; 233 SkChunkAlloc fImageAlloc;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 } 298 }
299 299
300 private: 300 private:
301 SkGlyphCache* fCache; 301 SkGlyphCache* fCache;
302 302
303 static bool DetachProc(const SkGlyphCache*, void*); 303 static bool DetachProc(const SkGlyphCache*, void*);
304 }; 304 };
305 305
306 #endif 306 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698