aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gm/arcto.cpp18
-rw-r--r--src/core/SkStroke.cpp6
2 files changed, 21 insertions, 3 deletions
diff --git a/gm/arcto.cpp b/gm/arcto.cpp
index 2897e7ab86..cd26eef35a 100644
--- a/gm/arcto.cpp
+++ b/gm/arcto.cpp
@@ -187,3 +187,21 @@ DEF_SIMPLE_GM(parsedpaths, canvas, kParsePathTestDimension, kParsePathTestDimens
sk_fclose(file);
#endif
}
+
+DEF_SIMPLE_GM(bug593049, canvas, 300, 300) {
+ canvas->translate(111, 0);
+
+ SkPath p;
+ p.moveTo(-43.44464063610148f, 79.43535936389853f);
+ const SkScalar yOffset = 122.88f;
+ const SkScalar radius = 61.44f;
+ SkRect oval = SkRect::MakeXYWH(-radius, yOffset - radius, 2 * radius, 2 * radius);
+ p.arcTo(oval, 1.25f * 180, .5f * 180, false);
+
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeCap(SkPaint::kRound_Cap);
+ paint.setStrokeWidth(15.36f);
+
+ canvas->drawPath(p, paint);
+}
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp
index 370cbdc09b..9c26294129 100644
--- a/src/core/SkStroke.cpp
+++ b/src/core/SkStroke.cpp
@@ -406,11 +406,11 @@ static bool has_valid_tangent(const SkPath::Iter* iter) {
}
void SkPathStroker::lineTo(const SkPoint& currPt, const SkPath::Iter* iter) {
- if (SkStrokerPriv::CapFactory(SkPaint::kButt_Cap) == fCapper
- && fPrevPt.equalsWithinTolerance(currPt, SK_ScalarNearlyZero * fInvResScale)) {
+ bool teenyLine = fPrevPt.equalsWithinTolerance(currPt, SK_ScalarNearlyZero * fInvResScale);
+ if (SkStrokerPriv::CapFactory(SkPaint::kButt_Cap) == fCapper && teenyLine) {
return;
}
- if (fPrevPt == currPt && (fJoinCompleted || (iter && has_valid_tangent(iter)))) {
+ if (teenyLine && (fJoinCompleted || (iter && has_valid_tangent(iter)))) {
return;
}
SkVector normal, unitNormal;