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
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,