Index: src/effects/SkBlurImageFilter.cpp |
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp |
index 3f4c852c12b887e7316bbd4129124d0ca332a83b..928793de62fcf0b2013af246a197a1193cf76a40 100644 |
--- a/src/effects/SkBlurImageFilter.cpp |
+++ b/src/effects/SkBlurImageFilter.cpp |
@@ -205,28 +205,30 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const |
if (!this->filterInputGPU(0, proxy, src, ctx, &input, &srcOffset)) { |
return false; |
} |
- SkIRect rect; |
- if (!this->applyCropRect(ctx, proxy, input, &srcOffset, &rect, &input)) { |
+ SkIRect srcBounds, dstBounds; |
+ if (!this->applyCropRect(ctx, input, srcOffset, &dstBounds, &srcBounds)) { |
return false; |
} |
GrTexture* source = input.getTexture(); |
SkVector sigma = mapSigma(fSigma, ctx.ctm()); |
- offset->fX = rect.fLeft; |
- offset->fY = rect.fTop; |
- rect.offset(-srcOffset); |
+ offset->fX = dstBounds.fLeft; |
+ offset->fY = dstBounds.fTop; |
+ srcBounds.offset(-srcOffset); |
+ dstBounds.offset(-srcOffset); |
+ SkRect srcBoundsF(SkRect::Make(srcBounds)); |
auto constraint = GrTextureProvider::FromImageFilter(ctx.sizeConstraint()); |
SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(source->getContext(), |
source, |
false, |
- SkRect::Make(rect), |
- true, |
+ SkRect::Make(dstBounds), |
+ &srcBoundsF, |
sigma.x(), |
sigma.y(), |
constraint)); |
if (!tex) { |
return false; |
} |
- WrapTexture(tex, rect.width(), rect.height(), result); |
+ WrapTexture(tex, dstBounds.width(), dstBounds.height(), result); |
return true; |
#else |
SkDEBUGFAIL("Should not call in GPU-less build"); |