aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2018-05-03 11:28:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-03 18:48:32 +0000
commit737b9a9d4806e376ee960d22578d08ea088c6ccd (patch)
treeddf8a76576a053f803e9371617ee86298414a323
parent884bce709a73bc19f9e347324cebe3dad3a9701a (diff)
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>
-rw-r--r--src/core/SkScan.cpp7
-rw-r--r--src/core/SkScan_AAAPath.cpp14
-rw-r--r--tests/PathTest.cpp3
-rw-r--r--tools/flags/SkCommonFlags.cpp2
4 files changed, 3 insertions, 23 deletions
diff --git a/src/core/SkScan.cpp b/src/core/SkScan.cpp
index 2603284f32..be9ea9c7c8 100644
--- a/src/core/SkScan.cpp
+++ b/src/core/SkScan.cpp
@@ -13,12 +13,7 @@
std::atomic<bool> gSkUseAnalyticAA{true};
std::atomic<bool> gSkForceAnalyticAA{false};
-#if defined(SK_SUPPORT_LEGACY_DELTA_AA)
- std::atomic<bool> gSkUseDeltaAA{false};
-#else
- std::atomic<bool> gSkUseDeltaAA{true};
-#endif
-
+std::atomic<bool> gSkUseDeltaAA{true};
std::atomic<bool> gSkForceDeltaAA{false};
static inline void blitrect(SkBlitter* blitter, const SkIRect& r) {
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp
index 3d78525d31..5e7f232ff7 100644
--- a/src/core/SkScan_AAAPath.cpp
+++ b/src/core/SkScan_AAAPath.cpp
@@ -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,
// 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.
- constexpr SkFixed SLACK =
-#ifdef SK_SUPPORT_LEGACY_AA_BEHAVIOR
- 0;
-#else
- SK_Fixed1;
-#endif
+ constexpr SkFixed SLACK = SK_Fixed1;
// 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.
@@ -1480,17 +1475,10 @@ static void aaa_walk_edges(SkAnalyticEdge* prevHead, SkAnalyticEdge* nextTail,
} else {
SkFixed rite = currE->fX;
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);
rite = SkTMin(rightClip, rite);
SkFixed nextRite = SkTMin(rightClip, currE->fX);
blit_trapezoid_row(blitter, y >> 16, left, rite, nextLeft, nextRite,
-#endif
leftDY, currE->fDY, fullAlpha, maskRow, isUsingMask,
noRealBlitter || (fullAlpha == 0xFF && (
edges_too_close(prevRite, left, leftE->fX) ||
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 477b02b7c0..9d8c18f997 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -4373,7 +4373,6 @@ static void test_fuzz_crbug_662730(skiatest::Reporter* reporter) {
test_draw_AA_path(100, 100, path);
}
-#if !defined(SK_SUPPORT_LEGACY_DELTA_AA)
static void test_skbug_6947() {
SkPath path;
SkPoint points[] =
@@ -4433,8 +4432,6 @@ static void test_skbug_7051() {
test_draw_AA_path(100, 100, path);
}
-#endif
-
static void test_interp(skiatest::Reporter* reporter) {
SkPath p1, p2, out;
REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
diff --git a/tools/flags/SkCommonFlags.cpp b/tools/flags/SkCommonFlags.cpp
index 90656077c2..42a5cdee7c 100644
--- a/tools/flags/SkCommonFlags.cpp
+++ b/tools/flags/SkCommonFlags.cpp
@@ -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"
"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;
#else
constexpr bool kDefaultDeltaAA = true;