diff options
author | Mike Reed <reed@google.com> | 2018-11-09 11:15:59 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-11-09 20:11:37 +0000 |
commit | 5cd242b4fc8fb926d1233bb4561c0607755c4e05 (patch) | |
tree | 135bdc436d6fb730e4f61e409594d37ca407ca71 /include | |
parent | 9918dacb503c786468d7409eb21850be78c0f19d (diff) | |
download | skqp-5cd242b4fc8fb926d1233bb4561c0607755c4e05.tar.gz |
rm legacy flags for hinting enum
Bug: skia:
Change-Id: I56ad33fa30aa8cec8a60cd70d4e4767defb923ca
Reviewed-on: https://skia-review.googlesource.com/c/170105
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkFont.h | 10 | ||||
-rw-r--r-- | include/core/SkFontTypes.h | 9 | ||||
-rw-r--r-- | include/core/SkPaint.h | 44 |
3 files changed, 7 insertions, 56 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h index 7ef02dc5b4..d7fc3a6458 100644 --- a/include/core/SkFont.h +++ b/include/core/SkFont.h @@ -66,16 +66,8 @@ public: void DEPRECATED_setAntiAlias(bool); void DEPRECATED_setLCDRender(bool); - void setHinting(SkFontHinting); - -#ifdef SK_SUPPORT_LEGACY_NESTED_HINTINGENUM - Hinting getHinting() const { return (Hinting)fHinting; } - void setHinting(Hinting hinting) { - this->setHinting((SkFontHinting)hinting); - } -#else SkFontHinting getHinting() const { return (SkFontHinting)fHinting; } -#endif + void setHinting(SkFontHinting); /** * Return a font with the same attributes of this font, but with the specified size. diff --git a/include/core/SkFontTypes.h b/include/core/SkFontTypes.h index ed7e157391..00b108b340 100644 --- a/include/core/SkFontTypes.h +++ b/include/core/SkFontTypes.h @@ -18,14 +18,6 @@ enum SkTextEncoding : uint8_t { kGlyphID_SkTextEncoding, }; -#ifdef SK_SUPPORT_LEGACY_NONCLASS_HINTINGENUM -enum SkFontHinting : uint8_t { - kNo_SkFontHinting = 0, //!< glyph outlines unchanged - kSlight_SkFontHinting = 1, //!< minimal modification to improve constrast - kNormal_SkFontHinting = 2, //!< glyph outlines modified to improve constrast - kFull_SkFontHinting = 3, //!< modifies glyph outlines for maximum constrast -}; -#else enum class SkFontHinting { kNone, //!< glyph outlines unchanged kSlight, //!< minimal modification to improve constrast @@ -37,6 +29,5 @@ enum class SkFontHinting { #define kSlight_SkFontHinting SkFontHinting::kSlight #define kNormal_SkFontHinting SkFontHinting::kNormal #define kFull_SkFontHinting SkFontHinting::kFull -#endif #endif diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index dcc2fca8e7..251fdaefa4 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -183,20 +183,12 @@ public: */ void reset(); - /** \enum SkPaint::Hinting - Hinting adjusts the glyph outlines so that the shape provides a uniform - look at a given point size on font engines that support it. Hinting may have a - muted effect or no effect at all depending on the platform. - - The four levels roughly control corresponding features on platforms that use FreeType - as the font engine. - */ - enum Hinting : uint8_t { - kNo_Hinting = 0, //!< glyph outlines unchanged - kSlight_Hinting = 1, //!< minimal modification to improve constrast - kNormal_Hinting = 2, //!< glyph outlines modified to improve constrast - kFull_Hinting = 3, //!< modifies glyph outlines for maximum constrast - }; + /** Returns level of glyph outline adjustment. + + @return one of: SkFontHinting::kNone, SkFontHinting::kSlight, SkFontHinting::kNormal, + SkFontHinting::kFull + */ + SkFontHinting getHinting() const { return (SkFontHinting)fBitfields.fHinting; } /** Sets level of glyph outline adjustment. Does not check for valid values of hintingLevel. @@ -206,30 +198,6 @@ public: */ void setHinting(SkFontHinting hintingLevel); -#ifdef SK_SUPPORT_LEGACY_NESTED_HINTINGENUM - /** Returns level of glyph outline adjustment. - - @return one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting - */ - Hinting getHinting() const { return (Hinting)fBitfields.fHinting; } - - /** Sets level of glyph outline adjustment. - Does not check for valid values of h. - - @param h one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting - */ - void setHinting(Hinting h) { - this->setHinting((SkFontHinting)h); - } -#else - /** Returns level of glyph outline adjustment. - - @return one of: SkFontHinting::kNone, SkFontHinting::kSlight, SkFontHinting::kNormal, - SkFontHinting::kFull - */ - SkFontHinting getHinting() const { return (SkFontHinting)fBitfields.fHinting; } -#endif - /** \enum SkPaint::Flags The bit values stored in Flags. The default value for Flags, normally zero, can be changed at compile time |