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 | 9 |
10 #include "GrTemplates.h" | 10 #include "GrTemplates.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 | 78 |
79 GrMaskFormat SkGrFontScaler::getMaskFormat() { | 79 GrMaskFormat SkGrFontScaler::getMaskFormat() { |
80 SkMask::Format format = fStrike->getMaskFormat(); | 80 SkMask::Format format = fStrike->getMaskFormat(); |
81 switch (format) { | 81 switch (format) { |
82 case SkMask::kBW_Format: | 82 case SkMask::kBW_Format: |
83 // fall through to kA8 -- we store BW glyphs in our 8-bit cache | 83 // fall through to kA8 -- we store BW glyphs in our 8-bit cache |
84 case SkMask::kA8_Format: | 84 case SkMask::kA8_Format: |
85 return kA8_GrMaskFormat; | 85 return kA8_GrMaskFormat; |
86 case SkMask::kLCD16_Format: | 86 case SkMask::kLCD16_Format: |
87 return kA565_GrMaskFormat; | 87 return kA565_GrMaskFormat; |
88 case SkMask::kARGB32_Format: | |
reed1
2013/11/26 19:58:03
This may have us not crash, but its not logically
bungeman-skia
2013/11/26 20:43:43
Done. Added comment that this is temporary. These
| |
88 case SkMask::kLCD32_Format: | 89 case SkMask::kLCD32_Format: |
89 return kA888_GrMaskFormat; | 90 return kA888_GrMaskFormat; |
90 default: | 91 default: |
91 SkDEBUGFAIL("unsupported SkMask::Format"); | 92 SkDEBUGFAIL("unsupported SkMask::Format"); |
92 return kA8_GrMaskFormat; | 93 return kA8_GrMaskFormat; |
93 } | 94 } |
94 } | 95 } |
95 | 96 |
96 const GrKey* SkGrFontScaler::getKey() { | 97 const GrKey* SkGrFontScaler::getKey() { |
97 if (NULL == fKey) { | 98 if (NULL == fKey) { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { | 193 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { |
193 | 194 |
194 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); | 195 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); |
195 const SkPath* skPath = fStrike->findPath(glyph); | 196 const SkPath* skPath = fStrike->findPath(glyph); |
196 if (skPath) { | 197 if (skPath) { |
197 *path = *skPath; | 198 *path = *skPath; |
198 return true; | 199 return true; |
199 } | 200 } |
200 return false; | 201 return false; |
201 } | 202 } |
OLD | NEW |