aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 6cf1ce61e4..81416e2817 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -225,8 +225,9 @@ sk_sp<SkSpecialImage> SkAlphaThresholdFilterImpl::onFilterImage(SkSpecialImage*
U8CPU outerThreshold = (U8CPU)(fOuterThreshold * 0xFF);
SkColor* dptr = dst.getAddr32(0, 0);
int dstWidth = dst.width(), dstHeight = dst.height();
+ SkIPoint srcOffset = { bounds.fLeft - inputOffset.fX, bounds.fTop - inputOffset.fY };
for (int y = 0; y < dstHeight; ++y) {
- const SkColor* sptr = inputBM.getAddr32(bounds.fLeft, bounds.fTop+y);
+ const SkColor* sptr = inputBM.getAddr32(srcOffset.fX, srcOffset.fY+y);
for (int x = 0; x < dstWidth; ++x) {
const SkColor& source = sptr[x];