move specialization of 16 -vs- 32 lcd format to the fonthost
git-svn-id: http://skia.googlecode.com/svn/trunk@2351 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
421093d99c
commit
2739b27d7d
@ -1195,6 +1195,7 @@ static void add_flattenable(SkDescriptor* desc, uint32_t tag,
|
||||
buffer->flatten(desc->addEntry(tag, buffer->size(), NULL));
|
||||
}
|
||||
|
||||
// SkFontHost can override this choice in FilterRec()
|
||||
static SkMask::Format computeMaskFormat(const SkPaint& paint) {
|
||||
uint32_t flags = paint.getFlags();
|
||||
|
||||
@ -1204,11 +1205,7 @@ static SkMask::Format computeMaskFormat(const SkPaint& paint) {
|
||||
}
|
||||
|
||||
if (flags & SkPaint::kLCDRenderText_Flag) {
|
||||
#if !defined(SK_SUPPORT_888_TEXT)
|
||||
return SkMask::kLCD16_Format;
|
||||
#else
|
||||
return SkMask::kLCD32_Format;
|
||||
#endif
|
||||
}
|
||||
|
||||
return SkMask::kA8_Format;
|
||||
|
@ -1088,6 +1088,10 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec) {
|
||||
h = SkPaint::kNormal_Hinting;
|
||||
}
|
||||
rec->setHinting(h);
|
||||
|
||||
if (SkMask::kLCD16_Format == rec->fMaskFormat) {
|
||||
rec->fMaskFormat = SkMask::kLCD32_Format;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user