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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1374383004: SkPDF: when drawing stroked path, draw using SVG rules for zero-length segments (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-10-06 (Tuesday) 12:31:14 EDT Created 5 years, 2 months 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') | src/pdf/SkPDFUtils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index b6500c1ed426af246a0d22b18b700355fad69655..9134d802ffc6de983c0fe022866aa1a5eedf09f5 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1035,7 +1035,12 @@ void SkPDFDevice::drawPath(const SkDraw& d,
if (!content.entry()) {
return;
}
+ bool consumeDegeratePathSegments =
+ paint.getStyle() == SkPaint::kFill_Style ||
+ (paint.getStrokeCap() != SkPaint::kRound_Cap &&
+ paint.getStrokeCap() != SkPaint::kSquare_Cap);
SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(),
+ consumeDegeratePathSegments,
&content.entry()->fContent);
SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(),
&content.entry()->fContent);
« no previous file with comments | « gm/path_stroke_with_zero_length.cpp ('k') | src/pdf/SkPDFUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698