diff options
author | Ben Wagner <bungeman@google.com> | 2018-05-07 17:58:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-08 19:15:34 +0000 |
commit | 2700779c531fac93eb24484bd4437a77557d4c68 (patch) | |
tree | e60f671faf0d07105d6f809faf03e080f1eac519 /src/core/SkBlurMask.cpp | |
parent | efb84e6734074defa325a27273c8c98903955f52 (diff) |
SkBlurMask to blur all the things.
SkBlurMask used to handle only A8 as input, and was recently extended to
ARGB as input. This adds LCD16 and A1 as inputs as well, allowing
SkScalerContext to no longer force all requests with a mask filter to
A8. This also fixes the shadows for LCD16 and A1 glyphs, which at small
sigma were quite obviously wrong since they were generated from an A8
version.
Change-Id: I151cdbf5556d18c2938da990ecee5bcd8ee31be8
Reviewed-on: https://skia-review.googlesource.com/126615
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkBlurMask.cpp')
-rw-r--r-- | src/core/SkBlurMask.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkBlurMask.cpp b/src/core/SkBlurMask.cpp index f189cd68ac..5e9a8186fe 100644 --- a/src/core/SkBlurMask.cpp +++ b/src/core/SkBlurMask.cpp @@ -97,7 +97,11 @@ void SkMask_FreeImage(uint8_t* image) { bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurStyle style, SkIPoint* margin) { - if (src.fFormat != SkMask::kA8_Format && src.fFormat != SkMask::kARGB32_Format) { + if (src.fFormat != SkMask::kBW_Format && + src.fFormat != SkMask::kA8_Format && + src.fFormat != SkMask::kARGB32_Format && + src.fFormat != SkMask::kLCD16_Format) + { return false; } |