diff options
-rw-r--r-- | src/core/SkPath.cpp | 7 | ||||
-rw-r--r-- | src/gpu/GrShape.cpp | 9 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 497037a09d..510efd6d9d 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -1309,14 +1309,9 @@ void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, // arcs from the same oval. auto addPt = [&forceMoveTo, this](const SkPoint& pt) { SkPoint lastPt; -#ifdef SK_DISABLE_ARC_TO_LINE_TO_CHECK - static constexpr bool kSkipLineToCheck = true; -#else - static constexpr bool kSkipLineToCheck = false; -#endif if (forceMoveTo) { this->moveTo(pt); - } else if (kSkipLineToCheck || !this->getLastPt(&lastPt) || + } else if (!this->getLastPt(&lastPt) || !SkScalarNearlyEqual(lastPt.fX, pt.fX) || !SkScalarNearlyEqual(lastPt.fY, pt.fY)) { this->lineTo(pt); diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp index 189b57be80..4cab0188d9 100644 --- a/src/gpu/GrShape.cpp +++ b/src/gpu/GrShape.cpp @@ -373,14 +373,6 @@ void GrShape::addGenIDChangeListener(SkPathRef::GenIDChangeListener* listener) c GrShape GrShape::MakeArc(const SkRect& oval, SkScalar startAngleDegrees, SkScalar sweepAngleDegrees, bool useCenter, const GrStyle& style) { -#ifdef SK_DISABLE_ARC_TO_LINE_TO_CHECK - // When this flag is set the segment mask of the path won't match GrShape's segment mask for - // paths. Represent this shape as a path. - SkPath path; - SkPathPriv::CreateDrawArcPath(&path, oval, startAngleDegrees, sweepAngleDegrees, useCenter, - style.isSimpleFill()); - return GrShape(path, style); -#else GrShape result; result.changeType(Type::kArc); result.fArcData.fOval = oval; @@ -391,7 +383,6 @@ GrShape GrShape::MakeArc(const SkRect& oval, SkScalar startAngleDegrees, SkScala result.fStyle = style; result.attemptToSimplifyArc(); return result; -#endif } GrShape::GrShape(const GrShape& that) : fStyle(that.fStyle) { |