Make SkPath::isOval() and SkPath::isRRect return the orientation and starting index.
These are tracked in SkPathRef.
Unit tests are updated to test that the returned values are correct.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012233002
Review-Url: https://codereview.chromium.org/2012233002
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index fbda7e8..03bc317 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1161,7 +1161,7 @@
this->close();
SkPathRef::Editor ed(&fPathRef);
- ed.setIsRRect(isRRect);
+ ed.setIsRRect(isRRect, dir, startIndex % 8);
SkASSERT(this->countVerbs() == initialVerbCount + kVerbs);
}
@@ -1259,7 +1259,7 @@
SkPathRef::Editor ed(&fPathRef);
- ed.setIsOval(isOval);
+ ed.setIsOval(isOval, kCCW_Direction == dir, startPointIndex % 4);
}
void SkPath::addCircle(SkScalar x, SkScalar y, SkScalar r, Direction dir) {