Revert of Remove SkClipStack's manual rounding of BW clip rects (patchset #3 id:80001 of https://codereview.chromium.org/1033453003/)

Reason for revert:
Reverting due to performance regression: https://code.google.com/p/skia/issues/detail?id=3597

Original issue's description:
> Remove SkClipStack's manual rounding of BW clip rects
>
> The full fix for this bug is nudging the image in device space. That is going to be a large change. This CL should address the immediate problem.
>
> This CL will alter the following GMs:
> clipdrawdraw
> convex_poly_clip
> complexclip_bw_*
> filltypespersp
> complexclip3_simple
>
>
>
> BUG=423834
>
> Committed: https://skia.googlesource.com/skia/+/e523d4f90c3368c555282a98b41ca5ee2045103e

TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=423834

Review URL: https://codereview.chromium.org/1045853002
This commit is contained in:
robertphillips 2015-03-30 08:09:58 -07:00 committed by Commit bot
parent d3e919123d
commit ff42021739

View File

@ -419,6 +419,13 @@ void SkClipStack::Element::updateBoundAndGenID(const Element* prior) {
break;
}
if (!fDoAA) {
fFiniteBound.set(SkScalarFloorToScalar(fFiniteBound.fLeft+0.45f),
SkScalarRoundToScalar(fFiniteBound.fTop),
SkScalarRoundToScalar(fFiniteBound.fRight),
SkScalarRoundToScalar(fFiniteBound.fBottom));
}
// Now determine the previous Element's bound information taking into
// account that there may be no previous clip
SkRect prevFinite;