Bug 1325518 - Make SkPath::conservativelyContainsRect consume degenerate segments. r=mchang, a=jcristau
authorLee Salzman <lsalzman@mozilla.com>
Wed, 11 Jan 2017 12:40:46 -0500
changeset 353627 63378496b7409caa224cd08afbde659e2fa9879a
parent 353626 977a08850b0568c636b732ff77a701be007eb8da
child 353628 d75736de7c46c359937ef7875b3435ade6717cde
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang, jcristau
bugs1325518
milestone52.0a2
Bug 1325518 - Make SkPath::conservativelyContainsRect consume degenerate segments. r=mchang, a=jcristau MozReview-Commit-ID: 78rE2oNc3IU
gfx/skia/skia/src/core/SkPath.cpp
--- a/gfx/skia/skia/src/core/SkPath.cpp
+++ b/gfx/skia/skia/src/core/SkPath.cpp
@@ -259,24 +259,24 @@ bool SkPath::conservativelyContainsRect(
 
     SkPathPriv::FirstDirection direction;
     if (!SkPathPriv::CheapComputeFirstDirection(*this, &direction)) {
         return false;
     }
 
     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:
                 SkASSERT(!segmentCount && !closeCount);
                 SkDEBUGCODE(++moveCnt);
                 firstPt = prevPt = pts[0];
                 break;
             case kLine_Verb: