Index: src/core/SkScan_Hairline.cpp |
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp |
index 52399c9d7844a6fb513653c0ca31bccfc4fbda4c..02099250fa89ef5969e2d9f38d2bba61e41290e7 100644 |
--- a/src/core/SkScan_Hairline.cpp |
+++ b/src/core/SkScan_Hairline.cpp |
@@ -471,6 +471,10 @@ void hair_path(const SkPath& path, const SkRasterClip& rclip, SkBlitter* blitter |
case SkPath::kClose_Verb: |
pts[0] = lastPt; |
pts[1] = firstPt; |
+ if (SkPaint::kButt_Cap != capStyle && prevVerb == SkPath::kMove_Verb) { |
+ // cap moveTo/close to match svg expectations for degenerate segments |
+ extend_pts<capStyle>(prevVerb, iter.peek(), pts, 2); |
+ } |
lineproc(pts, 2, clip, blitter); |
break; |
case SkPath::kDone_Verb: |