OLD | NEW |
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 SkPaint::FontMetrics fFontMetrics; | 223 SkPaint::FontMetrics fFontMetrics; |
224 | 224 |
225 enum { | 225 enum { |
226 kHashBits = 8, | 226 kHashBits = 8, |
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; | |
234 | 233 |
235 int fMetricsCount, fAdvanceCount; | 234 int fMetricsCount, fAdvanceCount; |
236 | 235 |
237 struct CharGlyphRec { | 236 struct CharGlyphRec { |
238 uint32_t fID; // unichar + subpixel | 237 uint32_t fID; // unichar + subpixel |
239 SkGlyph* fGlyph; | 238 SkGlyph* fGlyph; |
240 }; | 239 }; |
241 // no reason to use the same kHashCount as fGlyphHash, but we do for now | 240 // no reason to use the same kHashCount as fGlyphHash, but we do for now |
242 CharGlyphRec fCharToGlyphHash[kHashCount]; | 241 CharGlyphRec fCharToGlyphHash[kHashCount]; |
243 | 242 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 291 } |
293 } | 292 } |
294 | 293 |
295 private: | 294 private: |
296 SkGlyphCache* fCache; | 295 SkGlyphCache* fCache; |
297 | 296 |
298 static bool DetachProc(const SkGlyphCache*, void*); | 297 static bool DetachProc(const SkGlyphCache*, void*); |
299 }; | 298 }; |
300 | 299 |
301 #endif | 300 #endif |
OLD | NEW |