Index: src/effects/SkDashPathEffect.cpp |
=================================================================== |
--- src/effects/SkDashPathEffect.cpp (revision 9163) |
+++ src/effects/SkDashPathEffect.cpp (working copy) |
@@ -237,6 +237,7 @@ |
const SkScalar* intervals = fIntervals; |
SkScalar dashCount = 0; |
+ int segCount = 0; |
SkPath cullPathStorage; |
const SkPath* srcPtr = &src; |
@@ -291,6 +292,7 @@ |
addedSegment = false; |
if (is_even(index) && dlen > 0 && !skipFirstSegment) { |
addedSegment = true; |
+ ++segCount; |
if (specialLine) { |
lineRec.addSegment(SkDoubleToScalar(distance), |
@@ -322,9 +324,14 @@ |
if (meas.isClosed() && is_even(fInitialDashIndex) && |
fInitialDashLength > 0) { |
meas.getSegment(0, SkScalarMul(fInitialDashLength, scale), dst, !addedSegment); |
+ ++segCount; |
} |
} while (meas.nextContour()); |
+ if (segCount > 1) { |
+ dst->setConvexity(SkPath::kConcave_Convexity); |
+ } |
+ |
return true; |
} |