aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaint.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-22 13:19:43 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-22 13:19:43 +0000
commit1eeaf0ba2381f84ffd889f56303cbe0d1886bb21 (patch)
tree99852310e8d9f0a3f7a9c94f3ff0afb0375b48e4 /src/core/SkPaint.cpp
parent3c898186c9082c535e589807752a0a9dc5d28aa0 (diff)
Add support for 8 bits/component glyphs, to
better match the fonts produced by CoreText on OS/X. M include/config/SkUserConfig.h M include/core/SkMask.h M include/core/SkScalerContext.h M src/core/SkBlitter_ARGB32.cpp M src/core/SkScalerContext.cpp M src/core/SkPaint.cpp M src/gpu/SkGrFontScaler.cpp M src/ports/SkFontHost_mac_coretext.cpp M src/ports/SkFontHost_mac.cpp M gpu/include/GrTypes.h M gpu/src/GrAtlas.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@1672 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPaint.cpp')
-rw-r--r--src/core/SkPaint.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index f9abe3f420..0608320f40 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1198,7 +1198,11 @@ static SkMask::Format computeMaskFormat(const SkPaint& paint) {
}
#else
if (flags & SkPaint::kLCDRenderText_Flag) {
+#if !defined(SK_SUPPORT_888_TEXT)
return SkMask::kLCD16_Format;
+#else
+ return SkMask::kLCD32_Format;
+#endif
}
#endif
@@ -1294,7 +1298,9 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
rec->fMaskFormat = SkToU8(computeMaskFormat(paint));
- if (SkMask::kLCD16_Format == rec->fMaskFormat) {
+ if (SkMask::kLCD16_Format == rec->fMaskFormat ||
+ SkMask::kLCD32_Format == rec->fMaskFormat)
+ {
SkFontHost::LCDOrder order = SkFontHost::GetSubpixelOrder();
SkFontHost::LCDOrientation orient = SkFontHost::GetSubpixelOrientation();
if (SkFontHost::kNONE_LCDOrder == order) {