Index: src/effects/SkMergeImageFilter.cpp |
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp |
index 6e06b25945a84d73795d76a085d371a8cc9a5b72..e99991898c288a167d97b917da87c673ec687c40 100755 |
--- a/src/effects/SkMergeImageFilter.cpp |
+++ b/src/effects/SkMergeImageFilter.cpp |
@@ -81,24 +81,17 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
int inputCount = countInputs(); |
for (int i = 0; i < inputCount; ++i) { |
SkBitmap tmp; |
- const SkBitmap* srcPtr; |
+ SkBitmap input = src; |
SkIPoint pos = SkIPoint::Make(0, 0); |
- SkImageFilter* filter = getInput(i); |
- if (filter) { |
- if (!filter->filterImage(proxy, src, ctx, &tmp, &pos)) { |
- continue; |
- } |
- srcPtr = &tmp; |
- } else { |
- srcPtr = &src; |
+ if (!this->filterInput(i, proxy, src, ctx, &input, &pos)) { |
+ continue; |
} |
- |
if (fModes) { |
paint.setXfermodeMode((SkXfermode::Mode)fModes[i]); |
} else { |
paint.setXfermode(nullptr); |
} |
- canvas.drawSprite(*srcPtr, pos.x() - x0, pos.y() - y0, &paint); |
+ canvas.drawSprite(input, pos.x() - x0, pos.y() - y0, &paint); |
didProduceResult = true; |
} |