diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-11-21 19:32:29 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-11-21 19:32:29 +0000 |
commit | b6bb5cb7c2573a9829a0d3aa7b16a55830a7e816 (patch) | |
tree | 602e7f79f52c9bd188e68d84b3ae7e3b20ea1383 | |
parent | 8426058dee0faf75a18b81cfcde47ee8ab8c31d9 (diff) |
reorder bits and remove obsolete kForceAA experimental bit
git-svn-id: http://skia.googlecode.com/svn/trunk@2725 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkPaint.h | 5 | ||||
-rw-r--r-- | include/core/SkScalerContext.h | 33 | ||||
-rw-r--r-- | src/core/SkPaint.cpp | 5 | ||||
-rwxr-xr-x | src/ports/SkFontHost_win.cpp | 10 |
4 files changed, 16 insertions, 37 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 8649ea227f..db11b33a33 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -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. diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h index c9fb83b2c4..04dd847ff1 100644 --- a/include/core/SkScalerContext.h +++ b/include/core/SkScalerContext.h @@ -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 { diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index e1fd85a1c3..06201d3694 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -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 diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 7118307030..bce43a1e45 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -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; } } |