remove obsolete build flag SK_IGNORE_CONVEX_QUAD_OPT
Review URL: https://codereview.appspot.com/7363046
git-svn-id: http://skia.googlecode.com/svn/trunk@7820 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp
index 697acd4..b0794f6 100644
--- a/bench/PathBench.cpp
+++ b/bench/PathBench.cpp
@@ -745,9 +745,7 @@
add_corner_arc(path, r, xCorner, yCorner, 180);
path->close();
-#ifndef SK_IGNORE_CONVEX_QUAD_OPT
SkASSERT(path->isConvex());
-#endif
}
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp
index 1ca40be..0d4a9c7 100644
--- a/src/core/SkGeometry.cpp
+++ b/src/core/SkGeometry.cpp
@@ -1255,6 +1255,7 @@
}
#ifdef SK_SCALAR_IS_FLOAT
+
// Due to floating point issues (i.e., 1.0f - SK_ScalarRoot2Over2 !=
// SK_ScalarRoot2Over2 - SK_ScalarTanPIOver8) a cruder root2over2
// approximation is required to make the quad circle points convex. The
@@ -1267,11 +1268,7 @@
// Switch over to using cubics rather then quads
// Use a different method to create the mid-point (e.g., compute
// the two side points, average them, then move it out as needed
-#ifndef SK_IGNORE_CONVEX_QUAD_OPT
- #define SK_ScalarRoot2Over2_QuadCircle 0.7072f
-#else
- #define SK_ScalarRoot2Over2_QuadCircle SK_ScalarRoot2Over2
-#endif
+#define SK_ScalarRoot2Over2_QuadCircle 0.7072f
#else
#define SK_ScalarRoot2Over2_QuadCircle SK_FixedRoot2Over2
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index d4442cb..1714481 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -308,9 +308,7 @@
make_arb_round_rect(&temp, r, r.width() / 10, r.height() / 15);
-#ifndef SK_IGNORE_CONVEX_QUAD_OPT
REPORTER_ASSERT(reporter, temp.isConvex());
-#endif
}
}
@@ -337,11 +335,9 @@
make_arb_round_rect(&temp, r, 0, 0);
-#ifndef SK_IGNORE_CONVEX_QUAD_OPT
SkRect result;
REPORTER_ASSERT(reporter, temp.isRect(&result));
REPORTER_ASSERT(reporter, r == result);
-#endif
}
}