diff options
-rw-r--r-- | src/core/SkPathMeasure.cpp | 5 | ||||
-rw-r--r-- | tests/PathMeasureTest.cpp | 10 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index 4fb18934d9..cdcd164018 100644 --- a/src/core/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp @@ -667,7 +667,7 @@ bool SkPathMeasure::getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, } bool SkPathMeasure::isClosed() { - (void)this->getLength(); // make sure we measure the current contour + (void)this->getLength(); return fIsClosed; } @@ -675,8 +675,7 @@ bool SkPathMeasure::isClosed() { we're done with the path. */ bool SkPathMeasure::nextContour() { - (void)this->getLength(); // make sure we measure the current contour - fLength = -1; // now signal that we should build the next set of segments + fLength = -1; return this->getLength() > 0; } diff --git a/tests/PathMeasureTest.cpp b/tests/PathMeasureTest.cpp index bc75c5f122..df66578f1b 100644 --- a/tests/PathMeasureTest.cpp +++ b/tests/PathMeasureTest.cpp @@ -217,13 +217,3 @@ DEF_TEST(PathMeasureConic, reporter) { REPORTER_ASSERT(reporter, 19.5f < stdP.fX && stdP.fX < 20.5f); REPORTER_ASSERT(reporter, 19.5f < hiP.fX && hiP.fX < 20.5f); } - -// Regression test for b/26425223 -DEF_TEST(PathMeasure_nextctr, reporter) { - SkPath path; - path.moveTo(0, 0); path.lineTo(100, 0); - - SkPathMeasure meas(path, false); - // only expect 1 contour, even if we didn't explicitly call getLength() ourselves - REPORTER_ASSERT(reporter, !meas.nextContour()); -} |