| Index: src/effects/SkLightingImageFilter.cpp
|
| diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
|
| index 50cca07dfdb7e24f4fcbc425e46b7789954eba31..67d268143f3be53cb0e34efb3b6954947bb0d338 100644
|
| --- a/src/effects/SkLightingImageFilter.cpp
|
| +++ b/src/effects/SkLightingImageFilter.cpp
|
| @@ -927,7 +927,8 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy,
|
| SkIPoint* offset) {
|
| SkImageFilter* input = getInput(0);
|
| SkBitmap src = source;
|
| - if (input && !input->filterImage(proxy, source, ctm, &src, offset)) {
|
| + SkIPoint srcOffset = SkIPoint::Make(0, 0);
|
| + if (input && !input->filterImage(proxy, source, ctm, &src, &srcOffset)) {
|
| return false;
|
| }
|
|
|
| @@ -941,6 +942,7 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy,
|
|
|
| SkIRect bounds;
|
| src.getBounds(&bounds);
|
| + bounds.offset(srcOffset);
|
| if (!this->applyCropRect(&bounds, ctm)) {
|
| return false;
|
| }
|
| @@ -970,8 +972,8 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy,
|
| break;
|
| }
|
|
|
| - offset->fX += bounds.left();
|
| - offset->fY += bounds.top();
|
| + offset->fX = bounds.left();
|
| + offset->fY = bounds.top();
|
| return true;
|
| }
|
|
|
| @@ -1018,7 +1020,8 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy,
|
| SkIPoint* offset) {
|
| SkImageFilter* input = getInput(0);
|
| SkBitmap src = source;
|
| - if (input && !input->filterImage(proxy, source, ctm, &src, offset)) {
|
| + SkIPoint srcOffset = SkIPoint::Make(0, 0);
|
| + if (input && !input->filterImage(proxy, source, ctm, &src, &srcOffset)) {
|
| return false;
|
| }
|
|
|
| @@ -1032,6 +1035,7 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy,
|
|
|
| SkIRect bounds;
|
| src.getBounds(&bounds);
|
| + bounds.offset(srcOffset);
|
| if (!this->applyCropRect(&bounds, ctm)) {
|
| return false;
|
| }
|
| @@ -1059,8 +1063,8 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy,
|
| lightBitmap<SpecularLightingType, SkSpotLight>(lightingType, transformedLight, src, dst, surfaceScale(), bounds);
|
| break;
|
| }
|
| - offset->fX += bounds.left();
|
| - offset->fY += bounds.top();
|
| + offset->fX = bounds.left();
|
| + offset->fY = bounds.top();
|
| return true;
|
| }
|
|
|
|
|