diff options
author | Mike Reed <reed@google.com> | 2018-03-12 14:03:47 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-12 18:48:18 +0000 |
commit | 18e7556371506fd08bd0767a270c5db5a7804103 (patch) | |
tree | dbb3791194125d85970936ae37168770a0e8cc54 /src/utils/SkShadowUtils.cpp | |
parent | 05cb229e58efa052db5acf33be0441f4b4a28e7c (diff) |
move blur impl into core
Ever since we added drawShadow to the public api, blurs have necessarily
part of the core. This CL just formalizes that.
This should also allow us to have builds that exclude all of /effects (for code size)
and still be valid.
Will follow-up with a change to deprecate SkBlurMaskFilter and SkBlurQuality (both no longer needed).
Bug: skia:
Change-Id: Ifbbd8b47a30a0386d215726b67bcf1e8b84fb8f5
Reviewed-on: https://skia-review.googlesource.com/113713
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/utils/SkShadowUtils.cpp')
-rw-r--r-- | src/utils/SkShadowUtils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/utils/SkShadowUtils.cpp b/src/utils/SkShadowUtils.cpp index 928bdee103..348edb7790 100644 --- a/src/utils/SkShadowUtils.cpp +++ b/src/utils/SkShadowUtils.cpp @@ -7,12 +7,12 @@ #include "SkShadowUtils.h" #include "SkBlurMask.h" -#include "SkBlurMaskFilter.h" #include "SkCanvas.h" #include "SkColorFilter.h" #include "SkColorData.h" #include "SkDevice.h" #include "SkDrawShadowInfo.h" +#include "SkMaskFilter.h" #include "SkPath.h" #include "SkPM4f.h" #include "SkRandom.h" @@ -642,8 +642,8 @@ void SkBaseDevice::drawShadow(const SkPath& path, const SkDrawShadowRec& rec) { paint.setStrokeWidth(strokeWidth); paint.setStyle(SkPaint::kStrokeAndFill_Style); SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(blurRadius); - uint32_t flags = SkBlurMaskFilter::kIgnoreTransform_BlurFlag; - paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma, flags)); + bool respectCTM = false; + paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, sigma, respectCTM)); this->drawPath(devSpacePath, paint); } } @@ -727,8 +727,8 @@ void SkBaseDevice::drawShadow(const SkPath& path, const SkDrawShadowRec& rec) { SkPaint paint; paint.setColor(rec.fSpotColor); SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(radius); - uint32_t flags = SkBlurMaskFilter::kIgnoreTransform_BlurFlag; - paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma, flags)); + bool respectCTM = false; + paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, sigma, respectCTM)); this->drawPath(path, paint); } } |