aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkCoverageDelta.h
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2018-03-19 13:28:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-20 16:14:19 +0000
commitbba3ab7cabc07655f82b76ac12f4bcce65816b37 (patch)
tree0679cf5f5608110738984e0bb2bf5f7803163812 /src/core/SkCoverageDelta.h
parent50ea238a8898475b51c573a9cbea148ae8b94f70 (diff)
Reland "Check the boundary while cumulating deltas in a mask"
This reverts commit 2ac541e66ce1afe174b31c24705ca47891816078. Reason for revert: try a new fix; the old one doesn't work because the deltas are not sorted. We use masks specifically because we don't want to sort deltas. Original change's description: > Revert "Check the boundary while cumulating deltas in a mask" > > This reverts commit d9779bcf93c2e11699230a54214309732b9161a7. > > Reason for revert: breaks gold > > Original change's description: > > Check the boundary while cumulating deltas in a mask > > > > Without the fix, > > > > ./out/Debug/dm --config t8888 -m complexclip_bw > > > > will trigger the assert. > > > > Note that this boundary check is already in place when deltas are > > cumulated without using a mask. > > > > Bug: skia: > > Change-Id: I68bfe2b7196d440743d3a7535d097bb8ec7689c3 > > Reviewed-on: https://skia-review.googlesource.com/113210 > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > Reviewed-by: Cary Clark <caryclark@skia.org> > > TBR=liyuqian@google.com,reed@google.com,caryclark@skia.org > > Change-Id: Ice0e3618b02ef48b0f2a9f0662a12f76078e984a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/113170 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=liyuqian@google.com,reed@google.com,caryclark@skia.org Change-Id: Ia7a3608a54bed23827ed014213dcd6248adb271d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7731 Reviewed-on: https://skia-review.googlesource.com/113520 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/core/SkCoverageDelta.h')
-rw-r--r--src/core/SkCoverageDelta.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkCoverageDelta.h b/src/core/SkCoverageDelta.h
index 58c83ce343..13754890d0 100644
--- a/src/core/SkCoverageDelta.h
+++ b/src/core/SkCoverageDelta.h
@@ -107,8 +107,13 @@ private:
class SkCoverageDeltaMask {
public:
+#ifdef SK_SUPPORT_LEGACY_PRECISION_BOUNDARY
// 1 for precision error, 1 for boundary delta (e.g., -SK_Fixed1 at fBounds.fRight + 1)
static constexpr int PADDING = 2;
+#else
+ // 3 for precision error, 1 for boundary delta (e.g., -SK_Fixed1 at fBounds.fRight + 1)
+ static constexpr int PADDING = 4;
+#endif
static constexpr int SIMD_WIDTH = 8;
static constexpr int SUITABLE_WIDTH = 32;