OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 | |
10 #include "GrTemplates.h" | |
11 #include "GrFontScaler.h" | 9 #include "GrFontScaler.h" |
12 #include "SkDescriptor.h" | 10 #include "SkDescriptor.h" |
13 #include "SkDistanceFieldGen.h" | 11 #include "SkDistanceFieldGen.h" |
14 #include "SkGlyphCache.h" | 12 #include "SkGlyphCache.h" |
15 | 13 |
16 /////////////////////////////////////////////////////////////////////////////// | 14 /////////////////////////////////////////////////////////////////////////////// |
17 | 15 |
18 GrFontScaler::GrFontScaler(SkGlyphCache* strike) { | 16 GrFontScaler::GrFontScaler(SkGlyphCache* strike) { |
19 fStrike = strike; | 17 fStrike = strike; |
20 fKey = NULL; | 18 fKey = NULL; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 bool GrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { | 196 bool GrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { |
199 | 197 |
200 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); | 198 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); |
201 const SkPath* skPath = fStrike->findPath(glyph); | 199 const SkPath* skPath = fStrike->findPath(glyph); |
202 if (skPath) { | 200 if (skPath) { |
203 *path = *skPath; | 201 *path = *skPath; |
204 return true; | 202 return true; |
205 } | 203 } |
206 return false; | 204 return false; |
207 } | 205 } |
OLD | NEW |