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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 1612953004: Image filters: Make a recursive, forward-mapping bounds traversal. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 4 years, 11 months 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
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkMergeImageFilter.cpp » ('j') | 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 30f980a5c639232736d80f6278ec1bc3c08d6a08..41f1a6db71678fa8b0cb1afb6b4ffaafc53522b5 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -282,13 +282,12 @@ void SkDisplacementMapEffect::onFilterNodeBounds(const SkIRect& src, const SkMat
}
bool SkDisplacementMapEffect::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
- SkIRect* dst) const {
- SkIRect bounds;
- this->onFilterNodeBounds(src, ctm, &bounds, kReverse_MapDirection);
+ SkIRect* dst, MapDirection direction) const {
+ // Recurse only into color input.
if (this->getColorInput()) {
- return this->getColorInput()->filterBounds(bounds, ctm, dst);
+ return this->getColorInput()->filterBounds(src, ctm, dst, direction);
}
- *dst = bounds;
+ *dst = src;
return true;
}
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkMergeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698