Index: src/effects/SkMergeImageFilter.cpp |
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp |
index f68d9133782ea25ad70b1019ef09e158cbd33506..4c5404d5fb8bc9baf4de46374d1a86012b268c9f 100755 |
--- a/src/effects/SkMergeImageFilter.cpp |
+++ b/src/effects/SkMergeImageFilter.cpp |
@@ -77,6 +77,7 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
SkCanvas canvas(dst); |
SkPaint paint; |
+ bool didProduceResult = false; |
int inputCount = countInputs(); |
for (int i = 0; i < inputCount; ++i) { |
SkBitmap tmp; |
@@ -85,7 +86,7 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
SkImageFilter* filter = getInput(i); |
if (filter) { |
if (!filter->filterImage(proxy, src, ctx, &tmp, &pos)) { |
- return false; |
+ continue; |
} |
srcPtr = &tmp; |
} else { |
@@ -98,8 +99,12 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
paint.setXfermode(NULL); |
} |
canvas.drawSprite(*srcPtr, pos.x() - x0, pos.y() - y0, &paint); |
+ didProduceResult = true; |
} |
+ if (!didProduceResult) |
+ return false; |
+ |
offset->fX = bounds.left(); |
offset->fY = bounds.top(); |
*result = dst->accessBitmap(false); |