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>
This commit is contained in:
Yuqian Li 2016-12-02 10:14:36 -05:00 committed by Skia Commit-Bot
parent 3b3d8d55f5
commit dba05384e1
2 changed files with 0 additions and 21 deletions

View File

@ -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;
}

View File

@ -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
}
}