aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-01-12 15:50:38 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-12 15:50:38 -0800
commit933a03fecb65c83f81cf65d5cf9870c69aa379ff (patch)
treea5b254517a092387bcd57ee888e2ace4eb94373c /src
parentf62c63490f0cba13eaadce720b58a95720b2df86 (diff)
Fix GPU clipped-AA vs. non-AA drawRect discrepancy
In the clip stack we were manually rounding out non-AA clip rects but leaving the hardening of non-AA drawRects up to the GPU. In some border cases the GPU can truncate rather than round out resulting in visual discrepancies. BUG=423834 Review URL: https://codereview.chromium.org/839883003
Diffstat (limited to 'src')
-rw-r--r--src/core/SkClipStack.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index 515596a969..863dc9a387 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -418,19 +418,6 @@ void SkClipStack::Element::updateBoundAndGenID(const Element* prior) {
break;
}
- if (!fDoAA) {
- // Here we mimic a non-anti-aliased scanline system. If there is
- // no anti-aliasing we can integerize the bounding box to exclude
- // fractional parts that won't be rendered.
- // Note: the left edge is handled slightly differently below. We
- // are a bit more generous in the rounding since we don't want to
- // risk missing the left pixels when fLeft is very close to .5
- 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;