Revert "First draft of computeFastBounds() and onFilterBounds() for SkResizeImageFilter.", aka r13504 (this was an erroneous commit).

BUG=skia:
TBR=scroggo@google.com

Review URL: https://codereview.chromium.org/172793005

git-svn-id: http://skia.googlecode.com/svn/trunk@13505 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
senorblanco@chromium.org 2014-02-19 22:08:36 +00:00
parent e07c3097d0
commit 5a6abaa1c9

View File

@ -80,28 +80,3 @@ bool SkResizeImageFilter::onFilterImage(Proxy* proxy,
offset->fY = dstBounds.fTop;
return true;
}
void SkResizeImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const {
SkRect bounds = src;
if (getInput(0)) {
getInput(0)->computeFastBounds(src, &bounds);
}
dst->setXYWH(bounds.x(), bounds.y(), bounds.width() * fSx, bounds.height() * fSy);
}
bool SkResizeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
SkIRect* dst) const {
SkMatrix dstMatrix;
SkRect dstRect;
SkIRect dstRectI;
dstMatrix.setScale(SkScalarInvert(fSx), SkScalarInvert(fSy));
dstMatrix.mapRect(&dstRect, SkRect::Make(src));
dstRect.roundOut(&dstRectI);
if (getInput(0) && !getInput(0)->filterBounds(dstRectI, ctm, &dstRectI)) {
return false;
}
// *dst = dstRectI;
*dst = src;
return true;
}