remove legacy switch

Chrome tests have been rebased
and legacy define has been removed,
so remove from Skia as well.

R=fmalita@chromium.org

Bug:843966
Change-Id: I3794b8457c581f71d4bd30eb81d6fa4c8a589cad
Reviewed-on: https://skia-review.googlesource.com/c/176224
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Cary Clark 2018-12-10 16:38:59 -05:00 committed by Skia Commit-Bot
parent 1564069849
commit a10494c302

View File

@ -591,11 +591,7 @@ static bool quad_in_line(const SkPoint quad[3]) {
SkASSERT(outer2 >= 1 && outer2 <= 2);
SkASSERT(outer1 < outer2);
int mid = outer1 ^ outer2 ^ 3;
#ifdef SK_USE_LEGACY_CONIC_CURVATURE_SLOP
const float kCurvatureSlop = 0.00001f;
#else
const float kCurvatureSlop = 0.000005f; // this multiplier is pulled out of the air
#endif
SkScalar lineSlop = ptMax * ptMax * kCurvatureSlop;
return pt_to_line(quad[mid], quad[outer1], quad[outer2]) <= lineSlop;
}
@ -656,16 +652,9 @@ SkPathStroker::ReductionType SkPathStroker::CheckConicLinear(const SkConic& coni
if (!conic_in_line(conic)) {
return kQuad_ReductionType;
}
#ifdef SK_USE_LEGACY_CONIC_CURVATURE_SLOP
SkScalar xT = 0, yT = 0;
(void) conic.findXExtrema(&xT);
(void) conic.findYExtrema(&yT);
SkScalar t = SkTMax(xT, yT);
#else
// SkFindConicMaxCurvature would be a better solution, once we know how to
// implement it. Quad curvature is a reasonable substitute
SkScalar t = SkFindQuadMaxCurvature(conic.fPts);
#endif
if (0 == t) {
return kLine_ReductionType;
}