diff options
author | Mike Reed <reed@google.com> | 2018-03-20 16:47:32 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-20 17:23:08 +0000 |
commit | 140ab3659e0c5193c778c5e2752387cd0fbe370c (patch) | |
tree | da002b0f45f6fa9874f5f9a151773f15f1403bb9 /src/core/SkPathMeasure.cpp | |
parent | c10ebe60d464cc2eec3b58bf8cedb4fe0be05d0e (diff) |
Reland "fix nextContour bug"
This reverts commit 0a86820f2fe3b62f2a5ac2917a1ef342dbe53722.
Reason for revert: fix has landed in CTS
Original change's description:
> Revert "fix nextContour bug"
>
> This reverts commit 473f69276f1854db80e094cc4af091f7f8a5b00b.
>
> Reason for revert: a CTS test PathMeasureTest.android.graphics.cts.PathMeasureTest.testNextContour is failing
>
> Original change's description:
> > fix nextContour bug
> >
> > Calling nextContour() needs to ensure that we've already measured the "current" one.
> >
> > Bug: skia:
> > Change-Id: I501c26d0b068028d67103888f06ec89125a5407a
> > Reviewed-on: https://skia-review.googlesource.com/114692
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
>
> TBR=caryclark@google.com,reed@google.com
>
> Change-Id: I7f1e08651dfe73c02158b209dc28af2b174e246f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/114823
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>
TBR=caryclark@google.com,reed@google.com,stani@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I0fd61473ef0df62722cf6c6b86f1277f580e4ab1
Reviewed-on: https://skia-review.googlesource.com/115340
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkPathMeasure.cpp')
-rw-r--r-- | src/core/SkPathMeasure.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index df47af5440..7ce79f2780 100644 --- a/src/core/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp @@ -669,7 +669,7 @@ bool SkPathMeasure::getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, } bool SkPathMeasure::isClosed() { - (void)this->getLength(); + (void)this->getLength(); // make sure we measure the current contour return fIsClosed; } @@ -677,7 +677,8 @@ bool SkPathMeasure::isClosed() { we're done with the path. */ bool SkPathMeasure::nextContour() { - fLength = -1; + (void)this->getLength(); // make sure we measure the current contour + fLength = -1; // now signal that we should build the next set of segments return this->getLength() > 0; } |