Index: src/effects/SkBlurMaskFilter.cpp |
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp |
index a2d67d74af7b95344ef5d122decf0bfe22ced499..d196f8d209b0f76b64bf13dd5647a5d82c4c0914 100644 |
--- a/src/effects/SkBlurMaskFilter.cpp |
+++ b/src/effects/SkBlurMaskFilter.cpp |
@@ -66,7 +66,7 @@ public: |
const SkRRect& rrect) const override; |
bool filterMaskGPU(GrTexture* src, |
const SkMatrix& ctm, |
- const SkRect& maskRect, |
+ const SkIRect& maskRect, |
GrTexture** result, |
bool canOverwriteSrc) const override; |
#endif |
@@ -1235,10 +1235,11 @@ bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRRect& devRRect, |
bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src, |
const SkMatrix& ctm, |
- const SkRect& maskRect, |
+ const SkIRect& maskRect, |
GrTexture** result, |
bool canOverwriteSrc) const { |
- SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height()); |
+ // 'maskRect' isn't snapped to the UL corner but the mask in 'src' is. |
+ const SkIRect clipRect = SkIRect::MakeWH(maskRect.width(), maskRect.height()); |
GrContext* context = src->getContext(); |
@@ -1248,10 +1249,11 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src, |
// If we're doing a normal blur, we can clobber the pathTexture in the |
// gaussianBlur. Otherwise, we need to save it for later compositing. |
bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle); |
- sk_sp<GrDrawContext> drawContext(SkGpuBlurUtils::GaussianBlur(context, src, |
- isNormalBlur && canOverwriteSrc, |
- clipRect, nullptr, |
- xformedSigma, xformedSigma)); |
+ sk_sp<GrDrawContext> drawContext(SkGpuBlurUtils::GaussianBlur( |
+ context, src, |
+ isNormalBlur && canOverwriteSrc, |
+ clipRect, nullptr, |
+ xformedSigma, xformedSigma)); |
if (!drawContext) { |
return false; |
} |
@@ -1277,7 +1279,7 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src, |
paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); |
} |
- drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect); |
+ drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), SkRect::Make(clipRect)); |
} |
*result = drawContext->asTexture().release(); |