aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkDashPath.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-08-21 13:47:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-21 13:47:06 -0700
commit21b998b181bedcd92c3a0460d29492312c0cdc89 (patch)
tree6eb2e1aa25ee22ae2488e28b84cd983c1f90b072 /src/utils/SkDashPath.cpp
parentdd3c165828fffb369d0f4b13b48381169a0249a9 (diff)
Revert of experiment with zero-length round capped line segments (patchset #4 id:60001 of https://codereview.chromium.org/1309753002/ )
Reason for revert: More GMs changed than I expected. Will probably affect layout tests as well; reverting until I can verify that the changes are correct. Original issue's description: > experiment with zero-length round capped line segments > > If the endcap is not butt, draw the endcaps even when the line > has zero length. > > If the dash length is zero, generate a zero length line segment. > > Treat a move followed by a close as a move followed by a zero-length > line. > > R=reed@google.com,schenney@google.com > BUG=422974 > > Committed: https://skia.googlesource.com/skia/+/dd3c165828fffb369d0f4b13b48381169a0249a9 TBR=reed@google.com,schenney@google.com,schenney@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=422974 Review URL: https://codereview.chromium.org/1304163008
Diffstat (limited to 'src/utils/SkDashPath.cpp')
-rw-r--r--src/utils/SkDashPath.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/SkDashPath.cpp b/src/utils/SkDashPath.cpp
index de249f6fff..4b2b33d2c4 100644
--- a/src/utils/SkDashPath.cpp
+++ b/src/utils/SkDashPath.cpp
@@ -272,7 +272,7 @@ bool SkDashPath::FilterDashPath(SkPath* dst, const SkPath& src, SkStrokeRec* rec
while (distance < length) {
SkASSERT(dlen >= 0);
addedSegment = false;
- if (is_even(index) && !skipFirstSegment) {
+ if (is_even(index) && dlen > 0 && !skipFirstSegment) {
addedSegment = true;
++segCount;