reorder bits and remove obsolete kForceAA experimental bit
git-svn-id: http://skia.googlecode.com/svn/trunk@2725 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
8426058dee
commit
b6bb5cb7c2
@ -101,13 +101,10 @@ public:
|
||||
kAutoHinting_Flag = 0x800, //!< mask to force Freetype's autohinter
|
||||
kVerticalText_Flag = 0x1000,
|
||||
|
||||
// experimental/private
|
||||
kForceAAText_Flag = 0x2000,
|
||||
|
||||
// when adding extra flags, note that the fFlags member is specified
|
||||
// with a bit-width and you'll have to expand it.
|
||||
|
||||
kAllFlags = 0x2FFF
|
||||
kAllFlags = 0x1FFF
|
||||
};
|
||||
|
||||
/** Return the paint's flags. Use the Flag enum to test flag values.
|
||||
|
@ -157,28 +157,23 @@ struct SkGlyph {
|
||||
class SkScalerContext {
|
||||
public:
|
||||
enum Flags {
|
||||
kFrameAndFill_Flag = 0x01,
|
||||
kDevKernText_Flag = 0x02,
|
||||
kGammaForBlack_Flag = 0x04, // illegal to set both Gamma flags
|
||||
kGammaForWhite_Flag = 0x08, // illegal to set both Gamma flags
|
||||
|
||||
kFrameAndFill_Flag = 0x0001,
|
||||
kDevKernText_Flag = 0x0002,
|
||||
kEmbeddedBitmapText_Flag = 0x0004,
|
||||
kEmbolden_Flag = 0x0008,
|
||||
kSubpixelPositioning_Flag = 0x0010,
|
||||
kAutohinting_Flag = 0x0020,
|
||||
kVertical_Flag = 0x0040,
|
||||
// together, these two flags resulting in a two bit value which matches
|
||||
// up with the SkPaint::Hinting enum.
|
||||
kHintingBit1_Flag = 0x10,
|
||||
kHintingBit2_Flag = 0x20,
|
||||
|
||||
kEmbeddedBitmapText_Flag = 0x40,
|
||||
kEmbolden_Flag = 0x80,
|
||||
kSubpixelPositioning_Flag = 0x100,
|
||||
kAutohinting_Flag = 0x200,
|
||||
kVertical_Flag = 0x400,
|
||||
|
||||
kHintingBit1_Flag = 0x0080,
|
||||
kHintingBit2_Flag = 0x0100,
|
||||
// these should only ever be set if fMaskFormat is LCD16 or LCD32
|
||||
kLCD_Vertical_Flag = 0x0800, // else Horizontal
|
||||
kLCD_BGROrder_Flag = 0x1000, // else RGB order
|
||||
|
||||
// experimental
|
||||
kForceAA_Flag = 0x2000
|
||||
kLCD_Vertical_Flag = 0x0200, // else Horizontal
|
||||
kLCD_BGROrder_Flag = 0x0400, // else RGB order
|
||||
// gamma flags
|
||||
kGammaForBlack_Flag = 0x0800,
|
||||
kGammaForWhite_Flag = 0x1000,
|
||||
};
|
||||
private:
|
||||
enum {
|
||||
|
@ -1388,11 +1388,6 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
|
||||
if (paint.isVerticalText()) {
|
||||
flags |= SkScalerContext::kVertical_Flag;
|
||||
}
|
||||
#ifdef SK_BUILD_FOR_WIN
|
||||
if (paint.getFlags() & SkPaint::kForceAAText_Flag) {
|
||||
flags |= SkScalerContext::kForceAA_Flag;
|
||||
}
|
||||
#endif
|
||||
rec->fFlags = SkToU16(flags);
|
||||
|
||||
// setHinting modifies fFlags, so do this last
|
||||
|
@ -468,15 +468,7 @@ static BYTE compute_quality(const SkScalerContext::Rec& rec) {
|
||||
case SkMask::kLCD32_Format:
|
||||
return CLEARTYPE_QUALITY;
|
||||
default:
|
||||
// here we just want AA, but we may have to force the issue
|
||||
// since sometimes GDI will instead really give us BW
|
||||
// (for some fonts and some sizes)
|
||||
if (rec.fFlags & SkScalerContext::kForceAA_Flag) {
|
||||
return CLEARTYPE_QUALITY;
|
||||
} else {
|
||||
return ANTIALIASED_QUALITY;
|
||||
}
|
||||
break;
|
||||
return ANTIALIASED_QUALITY;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user