Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 101623007: Fixed more issues (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkXfermode.cpp ('K') | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« src/core/SkXfermode.cpp ('K') | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698