aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPathMeasure.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/core/SkPathMeasure.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/core/SkPathMeasure.cpp')
-rw-r--r--src/core/SkPathMeasure.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index 17ae95e801..a5dd84048c 100644
--- a/src/core/SkPathMeasure.cpp
+++ b/src/core/SkPathMeasure.cpp
@@ -314,12 +314,7 @@ static void seg_to(const SkPoint pts[], int segType,
SkASSERT(startT <= stopT);
if (startT == stopT) {
- /* if the dash as a zero-length on segment, add a corresponding zero-length line.
- The stroke code will add end caps to zero length lines as appropriate */
- SkPoint lastPt;
- SkAssertResult(dst->getLastPt(&lastPt));
- dst->lineTo(lastPt);
- return;
+ return; // should we report this, to undo a moveTo?
}
SkPoint tmp0[7], tmp1[7];
@@ -573,7 +568,7 @@ bool SkPathMeasure::getSegment(SkScalar startD, SkScalar stopD, SkPath* dst,
if (stopD > length) {
stopD = length;
}
- if (startD > stopD) {
+ if (startD >= stopD) {
return false;
}