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

Unified Diff: src/effects/SkMatrixImageFilter.cpp

Issue 785893004: Fix MatrixImageFilter computeFastBounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMatrixImageFilter.cpp
diff --git a/src/effects/SkMatrixImageFilter.cpp b/src/effects/SkMatrixImageFilter.cpp
index 919dff3994f3d822443c5601f47ed2a8dd6cd41f..f2c403f443aa450e64ec75108f390bf1b4a8cabe 100644
--- a/src/effects/SkMatrixImageFilter.cpp
+++ b/src/effects/SkMatrixImageFilter.cpp
@@ -98,11 +98,8 @@ void SkMatrixImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) cons
if (getInput(0)) {
getInput(0)->computeFastBounds(src, &bounds);
}
- SkMatrix matrix;
- matrix.setTranslate(-bounds.x(), -bounds.y());
- matrix.postConcat(fTransform);
- matrix.postTranslate(bounds.x(), bounds.y());
- matrix.mapRect(dst, bounds);
+ fTransform.mapRect(dst, bounds);
+ dst->join(bounds); // Work around for skia:3194
Stephen White 2014/12/08 17:20:51 This really doesn't seem right to me, and we could
}
bool SkMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698