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
This commit is contained in:
parent
e4646db4dc
commit
dff53c26e7
@ -745,9 +745,7 @@ protected:
|
||||
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 {
|
||||
|
@ -1255,6 +1255,7 @@ static bool quad_pt2OffCurve(const SkPoint quad[3], SkScalar x, SkScalar y, SkPo
|
||||
}
|
||||
|
||||
#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 @@ static bool quad_pt2OffCurve(const SkPoint quad[3], SkScalar x, SkScalar y, SkPo
|
||||
// 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
|
||||
|
@ -308,9 +308,7 @@ static void test_arb_round_rect_is_convex(skiatest::Reporter* reporter) {
|
||||
|
||||
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 @@ static void test_arb_zero_rad_round_rect_is_rect(skiatest::Reporter* reporter) {
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user