Lines Matching refs:sect2
220 static void BinarySearch(SkTSect* sect1, SkTSect<OppCurve, TCurve>* sect2,
263 void coincidentCheck(SkTSect<OppCurve, TCurve>* sect2);
264 void coincidentForce(SkTSect<OppCurve, TCurve>* sect2, double start1s, double start1e);
267 void computePerpendiculars(SkTSect<OppCurve, TCurve>* sect2, SkTSpan<TCurve, OppCurve>* first,
279 static int EndsEqual(const SkTSect* sect1, const SkTSect<OppCurve, TCurve>* sect2,
281 SkTSpan<TCurve, OppCurve>* extractCoincident(SkTSect<OppCurve, TCurve>* sect2,
292 bool matchedDirection(double t, const SkTSect<OppCurve, TCurve>* sect2, double t2) const;
293 void matchedDirCheck(double t, const SkTSect<OppCurve, TCurve>* sect2, double t2,
295 void mergeCoincidence(SkTSect<OppCurve, TCurve>* sect2);
875 bool SkTSect<TCurve, OppCurve>::binarySearchCoin(SkTSect<OppCurve, TCurve>* sect2, double tStart, in binarySearchCoin() argument
884 const OppCurve& opp = sect2->fCurve; in binarySearchCoin()
906 if (sect2->fHead->contains(oppTTest)) { in binarySearchCoin()
951 void SkTSect<TCurve, OppCurve>::coincidentCheck(SkTSect<OppCurve, TCurve>* sect2) { in coincidentCheck() argument
961 sect2->validate(); in coincidentCheck()
962 this->computePerpendiculars(sect2, first, last); in coincidentCheck()
964 sect2->validate(); in coincidentCheck()
968 coinStart = this->extractCoincident(sect2, coinStart, last); in coincidentCheck()
974 void SkTSect<TCurve, OppCurve>::coincidentForce(SkTSect<OppCurve, TCurve>* sect2, in coincidentForce() argument
978 SkTSpan<OppCurve, TCurve>* oppFirst = sect2->fHead; in coincidentForce()
979 SkTSpan<OppCurve, TCurve>* oppLast = sect2->tail(); in coincidentForce()
981 deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first); in coincidentForce()
983 sect2->removeSpanRange(oppFirst, oppLast); in coincidentForce()
987 first->fCoinStart.setPerp(fCurve, start1s, fCurve[0], sect2->fCurve); in coincidentForce()
988 first->fCoinEnd.setPerp(fCurve, start1e, fCurve[TCurve::kPointLast], sect2->fCurve); in coincidentForce()
997 oppFirst->resetBounds(sect2->fCurve); in coincidentForce()
999 sect2->removeCoincident(oppFirst, true); in coincidentForce()
1002 sect2->deleteEmptySpans(); in coincidentForce()
1032 void SkTSect<TCurve, OppCurve>::computePerpendiculars(SkTSect<OppCurve, TCurve>* sect2, in computePerpendiculars() argument
1034 const OppCurve& opp = sect2->fCurve; in computePerpendiculars()
1046 if (sect2->coincidentHasT(perpT)) { in computePerpendiculars()
1049 sect2->addForPerp(work, perpT); in computePerpendiculars()
1055 if (sect2->coincidentHasT(perpT)) { in computePerpendiculars()
1058 sect2->addForPerp(work, perpT); in computePerpendiculars()
1120 SkTSect<OppCurve, TCurve>* sect2, in extractCoincident() argument
1139 && this->binarySearchCoin(sect2, startT, prev->fStartT - startT, &coinStart, in extractCoincident()
1148 SkTSpan<OppCurve, TCurve>* oppHalf = sect2->addSplitAt(oppFirst, oppStartT); in extractCoincident()
1179 sect2->validate(); in extractCoincident()
1181 deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first); in extractCoincident()
1183 sect2->removeSpanRange(oppFirst, oppLast); in extractCoincident()
1186 first->fCoinStart.setPerp(fCurve, first->fStartT, first->fPart[0], sect2->fCurve); in extractCoincident()
1187 first->fCoinEnd.setPerp(fCurve, first->fEndT, first->fPart[TCurve::kPointLast], sect2->fCurve); in extractCoincident()
1196 oppFirst->resetBounds(sect2->fCurve); in extractCoincident()
1199 sect2->validateBounded(); in extractCoincident()
1202 sect2->removeCoincident(oppFirst, true); in extractCoincident()
1205 sect2->deleteEmptySpans(); in extractCoincident()
1208 sect2->validate(); in extractCoincident()
1501 bool SkTSect<TCurve, OppCurve>::matchedDirection(double t, const SkTSect<OppCurve, TCurve>* sect2, in matchedDirection() argument
1504 SkDVector dxdy2 = sect2->fCurve.dxdyAtT(t2); in matchedDirection()
1509 void SkTSect<TCurve, OppCurve>::matchedDirCheck(double t, const SkTSect<OppCurve, TCurve>* sect2, in matchedDirCheck() argument
1512 SkASSERT(*oppMatched == this->matchedDirection(t, sect2, t2)); in matchedDirCheck()
1514 *oppMatched = this->matchedDirection(t, sect2, t2); in matchedDirCheck()
1520 void SkTSect<TCurve, OppCurve>::mergeCoincidence(SkTSect<OppCurve, TCurve>* sect2) { in mergeCoincidence() argument
1562 coin.setPerp(fCurve, midT, midPt, sect2->fCurve); in mergeCoincidence()
1842 const SkTSect<OppCurve, TCurve>* sect2, SkIntersections* intersections) { in EndsEqual() argument
1844 if (sect1->fCurve[0] == sect2->fCurve[0]) { in EndsEqual()
1848 if (sect1->fCurve[0] == sect2->fCurve[OppCurve::kPointLast]) { in EndsEqual()
1852 if (sect1->fCurve[TCurve::kPointLast] == sect2->fCurve[0]) { in EndsEqual()
1856 if (sect1->fCurve[TCurve::kPointLast] == sect2->fCurve[OppCurve::kPointLast]) { in EndsEqual()
1862 && sect1->fCurve[0].approximatelyEqual(sect2->fCurve[0])) { in EndsEqual()
1864 intersections->insertNear(0, 0, sect1->fCurve[0], sect2->fCurve[0]); in EndsEqual()
1867 && sect1->fCurve[0].approximatelyEqual(sect2->fCurve[OppCurve::kPointLast])) { in EndsEqual()
1869 intersections->insertNear(0, 1, sect1->fCurve[0], sect2->fCurve[OppCurve::kPointLast]); in EndsEqual()
1873 && sect1->fCurve[TCurve::kPointLast].approximatelyEqual(sect2->fCurve[0])) { in EndsEqual()
1875 intersections->insertNear(1, 0, sect1->fCurve[TCurve::kPointLast], sect2->fCurve[0]); in EndsEqual()
1878 && sect1->fCurve[TCurve::kPointLast].approximatelyEqual(sect2->fCurve[ in EndsEqual()
1882 sect2->fCurve[OppCurve::kPointLast]); in EndsEqual()
2020 SkTSect<OppCurve, TCurve>* sect2, SkIntersections* intersections) { in BinarySearch() argument
2024 SkDEBUGCODE(sect1->fOppSect = sect2); in BinarySearch()
2025 SkDEBUGCODE(sect2->fOppSect = sect1); in BinarySearch()
2029 SkTSpan<OppCurve, TCurve>* span2 = sect2->fHead; in BinarySearch()
2030 int oppSect, sect = sect1->intersects(span1, sect2, span2, &oppSect); in BinarySearch()
2036 (void) EndsEqual(sect1, sect2, intersections); in BinarySearch()
2040 span2->addBounded(span1, §2->fHeap); in BinarySearch()
2051 SkTSpan<OppCurve, TCurve>* largest2 = sect2->boundsMax(); in BinarySearch()
2063 sect1->trim(largest1, sect2); in BinarySearch()
2064 sect1->trim(half1, sect2); in BinarySearch()
2070 SkTSpan<OppCurve, TCurve>* half2 = sect2->addOne(); in BinarySearch()
2071 if (!half2->split(largest2, §2->fHeap)) { in BinarySearch()
2074 sect2->trim(largest2, sect1); in BinarySearch()
2075 sect2->trim(half2, sect1); in BinarySearch()
2078 sect2->validate(); in BinarySearch()
2084 && sect2->fActiveCount >= COINCIDENT_SPAN_COUNT) { in BinarySearch()
2089 sect1->coincidentCheck(sect2); in BinarySearch()
2091 sect2->validate(); in BinarySearch()
2095 if (!--coinLoopCount && sect1->fHead && sect2->fHead) { in BinarySearch()
2101 sect1->coincidentForce(sect2, start1s, start1e); in BinarySearch()
2103 sect2->validate(); in BinarySearch()
2107 && sect2->fActiveCount >= COINCIDENT_SPAN_COUNT) { in BinarySearch()
2108 sect1->computePerpendiculars(sect2, sect1->fHead, sect1->tail()); in BinarySearch()
2109 sect2->computePerpendiculars(sect1, sect2->fHead, sect2->tail()); in BinarySearch()
2110 sect1->removeByPerpendicular(sect2); in BinarySearch()
2112 sect2->validate(); in BinarySearch()
2121 sect1->dumpBoth(sect2); in BinarySearch()
2123 if (!sect1->fHead || !sect2->fHead) { in BinarySearch()
2131 sect1->mergeCoincidence(sect2); in BinarySearch()
2134 SkASSERT(sect2->fCoincident); // courtesy check : coincidence only looks at sect 1 in BinarySearch()
2151 int zeroOneSet = EndsEqual(sect1, sect2, intersections); in BinarySearch()
2152 if (!sect1->fHead || !sect2->fHead) { in BinarySearch()
2156 sect2->recoverCollapsed(); in BinarySearch()
2164 if (sect2->fCurve.ptAtT(t).approximatelyEqual(start1)) { in BinarySearch()
2169 const SkTSpan<OppCurve, TCurve>* head2 = sect2->fHead; in BinarySearch()
2171 const SkDPoint& start2 = sect2->fCurve[0]; in BinarySearch()
2184 if (sect2->fCurve.ptAtT(t).approximatelyEqual(end1)) { in BinarySearch()
2189 const SkTSpan<OppCurve, TCurve>* tail2 = sect2->tail(); in BinarySearch()
2191 const SkDPoint& end2 = sect2->fCurve[OppCurve::kPointLast]; in BinarySearch()
2207 SkTSpan<OppCurve, TCurve>* result2 = sect2->fHead; in BinarySearch()
2226 perp.setPerp(sect1->fCurve, midT, midPt, sect2->fCurve); in BinarySearch()