aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2016-12-02 10:14:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-02 16:01:19 +0000
commitdba05384e1a21015b7df72d1006ee7054b1906f7 (patch)
tree0e90d0ae098cd9e30bbc2e4c6fa69157081243ed
parent3b3d8d55f52bf21a58352285504e220a286305ee (diff)
Remove SK_ANALYTIC_AA_GUARD flag
BUG=skia: Change-Id: I4e10ba7afc76ed41c6c41275f9b6a5dde3a2a4be Reviewed-on: https://skia-review.googlesource.com/5502 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
-rw-r--r--src/core/SkAnalyticEdge.cpp11
-rw-r--r--src/core/SkScan_AAAPath.cpp10
2 files changed, 0 insertions, 21 deletions
diff --git a/src/core/SkAnalyticEdge.cpp b/src/core/SkAnalyticEdge.cpp
index 44d73e6f94..057bc2170a 100644
--- a/src/core/SkAnalyticEdge.cpp
+++ b/src/core/SkAnalyticEdge.cpp
@@ -107,24 +107,13 @@ bool SkAnalyticQuadraticEdge::updateQuadratic() {
newy = oldy + (dy >> shift);
SkFDot6 diffY = (newy - fSnappedY) >> 10;
slope = diffY ? QuickSkFDot6Div((newx - fSnappedX) >> 10, diffY) : SK_MaxS32;
- #ifdef SK_ANALYTIC_AA_GUARD
- slope = dy >> 10 > 0 ? QuickSkFDot6Div(dx >> 10, dy >> 10) : SK_MaxS32;
- shift = 0;
- #endif
if (SkAbs32(dy >> shift) >= SK_Fixed1 * 2) { // only snap when dy is large enough
newSnappedY = SkTMin<SkFixed>(fQEdge.fQLastY, SkFixedRoundToFixed(newy));
newSnappedX = newx - SkFixedMul(slope, newy - newSnappedY);
- #ifdef SK_ANALYTIC_AA_GUARD
- // Note that SkFixedMul use (>> 16) so we'll have different answers
- newSnappedX = newx + SkFixedMul(slope, newSnappedY - newy);
- #endif
} else {
newSnappedY = SkTMin(fQEdge.fQLastY, snapY(newy));
newSnappedX = newx;
}
- #ifdef SK_ANALYTIC_AA_GUARD
- shift = fCurveShift;
- #endif
dx += fQEdge.fQDDx;
dy += fQEdge.fQDDy;
}
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp
index 554f99d2b3..f96e7b9bb8 100644
--- a/src/core/SkScan_AAAPath.cpp
+++ b/src/core/SkScan_AAAPath.cpp
@@ -1017,13 +1017,8 @@ static inline void aaa_walk_convex_edges(SkAnalyticEdge* prevHead, AdditiveBlitt
}
} else { // left and rite are within the same pixel
if (partialTop > 0) {
- #ifdef SK_ANALYTIC_AA_GUARD
- blitter->getRealBlitter()->blitV(fullLeft - 1, fullTop - 1, 1,
- f2a(SkFixedMul(partialTop, rite - left)));
- #else
blitter->blitAntiH(fullLeft - 1, fullTop - 1, 1,
f2a(SkFixedMul(partialTop, rite - left)));
- #endif
blitter->flush_if_y_changed(y, y + partialTop);
}
if (fullBot > fullTop) {
@@ -1031,13 +1026,8 @@ static inline void aaa_walk_convex_edges(SkAnalyticEdge* prevHead, AdditiveBlitt
f2a(rite - left));
}
if (partialBot > 0) {
- #ifdef SK_ANALYTIC_AA_GUARD
- blitter->getRealBlitter()->blitV(fullLeft - 1, fullBot, 1,
- f2a(SkFixedMul(partialBot, rite - left)));
- #else
blitter->blitAntiH(fullLeft - 1, fullBot, 1,
f2a(SkFixedMul(partialBot, rite - left)));
- #endif
}
}