Index: src/effects/SkBlurImageFilter.cpp |
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp |
index ffebe54225ee37f348f97011c3447889780a389c..adcb28f90d8f25ce2d5b3905eceaddacb799d424 100644 |
--- a/src/effects/SkBlurImageFilter.cpp |
+++ b/src/effects/SkBlurImageFilter.cpp |
@@ -146,13 +146,15 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy, |
return false; |
} |
- SkIRect srcBounds, dstBounds; |
- if (!this->applyCropRect(ctx, proxy, src, &srcOffset, &srcBounds, &src)) { |
+ SkAutoLockPixels alp(src); |
+ if (!src.getPixels()) { |
return false; |
} |
- SkAutoLockPixels alp(src); |
- if (!src.getPixels()) { |
+ SkIRect srcBounds, dstBounds; |
+ src.getBounds(&srcBounds); |
+ srcBounds.offset(srcOffset); |
+ if (!this->applyCropRect(&srcBounds, ctx.ctm())) { |
return false; |
} |
@@ -256,11 +258,13 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const |
if (getInput(0) && !getInput(0)->getInputResultGPU(proxy, src, ctx, &input, &srcOffset)) { |
return false; |
} |
+ GrTexture* source = input.getTexture(); |
SkIRect rect; |
- if (!this->applyCropRect(ctx, proxy, input, &srcOffset, &rect, &input)) { |
+ src.getBounds(&rect); |
+ rect.offset(srcOffset); |
+ if (!this->applyCropRect(&rect, ctx.ctm())) { |
return false; |
} |
- GrTexture* source = input.getTexture(); |
SkVector sigma, localSigma = SkVector::Make(fSigma.width(), fSigma.height()); |
ctx.ctm().mapVectors(&sigma, &localSigma, 1); |
offset->fX = rect.fLeft; |