Chromium Code Reviews| Index: src/effects/SkDisplacementMapEffect.cpp |
| diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
| index 6e5c910edf4f6f04a670841d2906587e95115675..88e048f6fa48c80a1fe82116f92da081e64c2e36 100644 |
| --- a/src/effects/SkDisplacementMapEffect.cpp |
| +++ b/src/effects/SkDisplacementMapEffect.cpp |
| @@ -205,6 +205,14 @@ bool SkDisplacementMapEffect::onFilterImage(Proxy* proxy, |
| if (!this->applyCropRect(&bounds, ctm)) { |
| return false; |
| } |
| + SkIRect displBounds; |
| + displ.getBounds(&displBounds); |
| + if (!this->applyCropRect(&displBounds, ctm)) { |
|
Stephen White
2013/12/09 21:16:12
Please add a GM test case for this.
|
| + return false; |
| + } |
| + if (!bounds.intersect(displBounds)) { |
| + return false; |
| + } |
| dst->setConfig(color.config(), bounds.width(), bounds.height()); |
| dst->allocPixels(); |