Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: src/core/SkScan_Hairline.cpp

Issue 1527083002: add caps for hairline moveTo / close (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: check if readpixels fails Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/path_stroke_with_zero_length.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « gm/path_stroke_with_zero_length.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698