Bug 1325518 - make SkPath::conservativelyContainsRect consume degenerate segments. r=mchang

MozReview-Commit-ID: 78rE2oNc3IU
This commit is contained in:
Lee Salzman 2017-01-11 12:40:46 -05:00
parent 16ea68bade
commit b8debd5aca

View File

@ -264,14 +264,14 @@ bool SkPath::conservativelyContainsRect(const SkRect& rect) const {
SkPoint firstPt;
SkPoint prevPt;
RawIter iter(*this);
SkPath::Iter iter(*this, true);
SkPath::Verb verb;
SkPoint pts[4];
SkDEBUGCODE(int moveCnt = 0;)
SkDEBUGCODE(int segmentCount = 0;)
SkDEBUGCODE(int closeCount = 0;)
while ((verb = iter.next(pts)) != kDone_Verb) {
while ((verb = iter.next(pts, true, true)) != kDone_Verb) {
int nextPt = -1;
switch (verb) {
case kMove_Verb: