Remove legacy guard flags

Bug: skia:
Change-Id: I3b526f2caec6766faea72cdc89550f50e17c71d2
Reviewed-on: https://skia-review.googlesource.com/125746
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This commit is contained in:
Yuqian Li 2018-05-03 11:28:28 -04:00 committed by Skia Commit-Bot
parent 884bce709a
commit 737b9a9d48
4 changed files with 3 additions and 23 deletions

View File

@ -13,12 +13,7 @@
std::atomic<bool> gSkUseAnalyticAA{true}; std::atomic<bool> gSkUseAnalyticAA{true};
std::atomic<bool> gSkForceAnalyticAA{false}; std::atomic<bool> gSkForceAnalyticAA{false};
#if defined(SK_SUPPORT_LEGACY_DELTA_AA) std::atomic<bool> gSkUseDeltaAA{true};
std::atomic<bool> gSkUseDeltaAA{false};
#else
std::atomic<bool> gSkUseDeltaAA{true};
#endif
std::atomic<bool> gSkForceDeltaAA{false}; std::atomic<bool> gSkForceDeltaAA{false};
static inline void blitrect(SkBlitter* blitter, const SkIRect& r) { static inline void blitrect(SkBlitter* blitter, const SkIRect& r) {

View File

@ -1287,12 +1287,7 @@ static inline bool edges_too_close(SkAnalyticEdge* prev, SkAnalyticEdge* next, S
// even if prev->fX and next->fX are close and within one pixel (e.g., prev->fX == 0.1, // even if prev->fX and next->fX are close and within one pixel (e.g., prev->fX == 0.1,
// next->fX == 0.9). Adding SLACK = 1 to the formula would guarantee it to be true if two // next->fX == 0.9). Adding SLACK = 1 to the formula would guarantee it to be true if two
// edges prev and next are within one pixel. // edges prev and next are within one pixel.
constexpr SkFixed SLACK = constexpr SkFixed SLACK = SK_Fixed1;
#ifdef SK_SUPPORT_LEGACY_AA_BEHAVIOR
0;
#else
SK_Fixed1;
#endif
// Note that even if the following test failed, the edges might still be very close to each // Note that even if the following test failed, the edges might still be very close to each
// other at some point within the current pixel row because of prev->fDX and next->fDX. // other at some point within the current pixel row because of prev->fDX and next->fDX.
@ -1480,17 +1475,10 @@ static void aaa_walk_edges(SkAnalyticEdge* prevHead, SkAnalyticEdge* nextTail,
} else { } else {
SkFixed rite = currE->fX; SkFixed rite = currE->fX;
currE->goY(nextY, yShift); currE->goY(nextY, yShift);
#ifdef SK_SUPPORT_LEGACY_DELTA_AA
leftE->fX = SkTMax(leftClip, leftE->fX);
rite = SkTMin(rightClip, rite);
currE->fX = SkTMin(rightClip, currE->fX);
blit_trapezoid_row(blitter, y >> 16, left, rite, leftE->fX, currE->fX,
#else
SkFixed nextLeft = SkTMax(leftClip, leftE->fX); SkFixed nextLeft = SkTMax(leftClip, leftE->fX);
rite = SkTMin(rightClip, rite); rite = SkTMin(rightClip, rite);
SkFixed nextRite = SkTMin(rightClip, currE->fX); SkFixed nextRite = SkTMin(rightClip, currE->fX);
blit_trapezoid_row(blitter, y >> 16, left, rite, nextLeft, nextRite, blit_trapezoid_row(blitter, y >> 16, left, rite, nextLeft, nextRite,
#endif
leftDY, currE->fDY, fullAlpha, maskRow, isUsingMask, leftDY, currE->fDY, fullAlpha, maskRow, isUsingMask,
noRealBlitter || (fullAlpha == 0xFF && ( noRealBlitter || (fullAlpha == 0xFF && (
edges_too_close(prevRite, left, leftE->fX) || edges_too_close(prevRite, left, leftE->fX) ||

View File

@ -4373,7 +4373,6 @@ static void test_fuzz_crbug_662730(skiatest::Reporter* reporter) {
test_draw_AA_path(100, 100, path); test_draw_AA_path(100, 100, path);
} }
#if !defined(SK_SUPPORT_LEGACY_DELTA_AA)
static void test_skbug_6947() { static void test_skbug_6947() {
SkPath path; SkPath path;
SkPoint points[] = SkPoint points[] =
@ -4433,8 +4432,6 @@ static void test_skbug_7051() {
test_draw_AA_path(100, 100, path); test_draw_AA_path(100, 100, path);
} }
#endif
static void test_interp(skiatest::Reporter* reporter) { static void test_interp(skiatest::Reporter* reporter) {
SkPath p1, p2, out; SkPath p1, p2, out;
REPORTER_ASSERT(reporter, p1.isInterpolatable(p2)); REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));

View File

@ -91,7 +91,7 @@ DEFINE_bool(forceAnalyticAA, false, "Force analytic anti-aliasing even if the pa
"whether it's concave or convex, we consider a path complicated" "whether it's concave or convex, we consider a path complicated"
"if its number of points is comparable to its resolution."); "if its number of points is comparable to its resolution.");
#if defined(SK_SUPPORT_LEGACY_DELTA_AA) || (defined(_MSC_VER) && !defined(__clang__)) #if (defined(_MSC_VER) && !defined(__clang__))
constexpr bool kDefaultDeltaAA = false; constexpr bool kDefaultDeltaAA = false;
#else #else
constexpr bool kDefaultDeltaAA = true; constexpr bool kDefaultDeltaAA = true;