aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-03-30 08:09:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-30 08:09:58 -0700
commitff420217394e6e35e831b11e98b46202e37de23f (patch)
tree6e6fa08082b621bc6cbaafd3240bf7e65407d841 /src
parentd3e919123d46fc98fbe5f70a23afdfa9f8d92131 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/core/SkClipStack.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index a51185e95a..e0c3db01ba 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -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;