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:
parent
3b3d8d55f5
commit
dba05384e1
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user