Fix MatrixImageFilter computeFastBounds

This CL makes the bounding box returned from SkMatrixImageFilter::computeFastBounds actually contain the final result pixels. This, in turn, fixes the first two rows of the filterfastbounds GM and the SVG web page cited in the bug.

BUG=418417

Review URL: https://codereview.chromium.org/785893004
This commit is contained in:
robertphillips 2014-12-09 05:28:24 -08:00 committed by Commit bot
parent ff3106c214
commit 8b7b9c2e80

View File

@ -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
}
bool SkMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,