Lines Matching refs:sect2
548 bool SkTSect::binarySearchCoin(SkTSect* sect2, double tStart,
558 const SkTCurve& opp = sect2->fCurve;
580 if (sect2->fHead->contains(oppTTest)) {
605 } else if (oppPt.approximatelyEqual(sect2->pointLast())) {
636 bool SkTSect::coincidentCheck(SkTSect* sect2) {
649 sect2->validate();
650 this->computePerpendiculars(sect2, first, last);
652 sect2->validate();
656 bool success = this->extractCoincident(sect2, coinStart, last, &coinStart);
661 if (!fHead || !sect2->fHead) {
671 void SkTSect::coincidentForce(SkTSect* sect2,
675 SkTSpan* oppFirst = sect2->fHead;
676 SkTSpan* oppLast = sect2->tail();
681 deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first);
683 sect2->removeSpanRange(oppFirst, oppLast);
687 first->fCoinStart.setPerp(fCurve, start1s, fCurve[0], sect2->fCurve);
688 first->fCoinEnd.setPerp(fCurve, start1e, this->pointLast(), sect2->fCurve);
698 oppFirst->resetBounds(sect2->fCurve);
700 sect2->removeCoincident(oppFirst, true);
703 sect2->deleteEmptySpans();
730 void SkTSect::computePerpendiculars(SkTSect* sect2,
735 const SkTCurve& opp = sect2->fCurve;
747 if (sect2->coincidentHasT(perpT)) {
750 sect2->addForPerp(work, perpT);
756 if (sect2->coincidentHasT(perpT)) {
759 sect2->addForPerp(work, perpT);
824 SkTSect* sect2,
845 && this->binarySearchCoin(sect2, startT, prev->fStartT - startT, &coinStart,
854 SkTSpan* oppHalf = sect2->addSplitAt(oppFirst, oppStartT);
901 sect2->validate();
903 deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first);
905 sect2->removeSpanRange(oppFirst, oppLast);
908 first->fCoinStart.setPerp(fCurve, first->fStartT, first->pointFirst(), sect2->fCurve);
909 first->fCoinEnd.setPerp(fCurve, first->fEndT, first->pointLast(), sect2->fCurve);
919 oppFirst->resetBounds(sect2->fCurve);
922 sect2->validateBounded();
927 if (!sect2->removeCoincident(oppFirst, true)) {
931 if (!this->deleteEmptySpans() || !sect2->deleteEmptySpans()) {
937 sect2->validate();
938 *result = last && !last->fDeleted && fHead && sect2->fHead ? last : nullptr;
1238 bool SkTSect::matchedDirection(double t, const SkTSect* sect2,
1241 SkDVector dxdy2 = sect2->fCurve.dxdyAtT(t2);
1245 void SkTSect::matchedDirCheck(double t, const SkTSect* sect2,
1248 SkASSERT(*oppMatched == this->matchedDirection(t, sect2, t2));
1250 *oppMatched = this->matchedDirection(t, sect2, t2);
1255 void SkTSect::mergeCoincidence(SkTSect* sect2) {
1300 coin.setPerp(fCurve, midT, midPt, sect2->fCurve);
1604 const SkTSect* sect2, SkIntersections* intersections) {
1606 if (sect1->fCurve[0] == sect2->fCurve[0]) {
1610 if (sect1->fCurve[0] == sect2->pointLast()) {
1614 if (sect1->pointLast() == sect2->fCurve[0]) {
1618 if (sect1->pointLast() == sect2->pointLast()) {
1624 && sect1->fCurve[0].approximatelyEqual(sect2->fCurve[0])) {
1626 intersections->insertNear(0, 0, sect1->fCurve[0], sect2->fCurve[0]);
1629 && sect1->fCurve[0].approximatelyEqual(sect2->pointLast())) {
1631 intersections->insertNear(0, 1, sect1->fCurve[0], sect2->pointLast());
1635 && sect1->pointLast().approximatelyEqual(sect2->fCurve[0])) {
1637 intersections->insertNear(1, 0, sect1->pointLast(), sect2->fCurve[0]);
1640 && sect1->pointLast().approximatelyEqual(sect2->pointLast())) {
1642 intersections->insertNear(1, 1, sect1->pointLast(), sect2->pointLast());
1778 SkTSect* sect2, SkIntersections* intersections) {
1782 SkDEBUGCODE(sect1->fOppSect = sect2);
1783 SkDEBUGCODE(sect2->fOppSect = sect1);
1787 SkTSpan* span2 = sect2->fHead;
1788 int oppSect, sect = sect1->intersects(span1, sect2, span2, &oppSect);
1794 (void) EndsEqual(sect1, sect2, intersections);
1798 span2->addBounded(span1, §2->fHeap);
1812 SkTSpan* largest2 = sect2->boundsMax();
1816 if (sect2->fHung) {
1823 sect2->resetRemovedEnds();
1830 if (!sect1->trim(largest1, sect2)) {
1834 if (!sect1->trim(half1, sect2)) {
1843 sect2->resetRemovedEnds();
1845 SkTSpan* half2 = sect2->addOne();
1846 SkDEBUGCODE(half2->debugSetGlobalState(sect2->globalState()));
1847 if (!half2->split(largest2, §2->fHeap)) {
1850 if (!sect2->trim(largest2, sect1)) {
1854 if (!sect2->trim(half2, sect1)) {
1860 sect2->validate();
1866 && sect2->fActiveCount >= COINCIDENT_SPAN_COUNT) {
1871 if (!sect1->coincidentCheck(sect2)) {
1875 sect2->validate();
1879 if (!--coinLoopCount && sect1->fHead && sect2->fHead) {
1885 sect1->coincidentForce(sect2, start1s, start1e);
1887 sect2->validate();
1891 && sect2->fActiveCount >= COINCIDENT_SPAN_COUNT) {
1895 sect1->computePerpendiculars(sect2, sect1->fHead, sect1->tail());
1896 if (!sect2->fHead) {
1899 sect2->computePerpendiculars(sect1, sect2->fHead, sect2->tail());
1900 if (!sect1->removeByPerpendicular(sect2)) {
1904 sect2->validate();
1913 sect1->dumpBoth(sect2);
1915 if (!sect1->fHead || !sect2->fHead) {
1923 sect1->mergeCoincidence(sect2);
1926 SkASSERT(sect2->fCoincident); // courtesy check : coincidence only looks at sect 1
1950 int zeroOneSet = EndsEqual(sect1, sect2, intersections);
1951 // if (!sect1->fHead || !sect2->fHead) {
1955 perp.setPerp(sect1->fCurve, 0, sect1->fCurve[0], sect2->fCurve);
1962 perp.setPerp(sect1->fCurve, 1, sect1->pointLast(), sect2->fCurve);
1967 if (sect2->fRemovedStartT && !(zeroOneSet & kZeroS2Set)) {
1969 perp.setPerp(sect2->fCurve, 0, sect2->fCurve[0], sect1->fCurve);
1974 if (sect2->fRemovedEndT && !(zeroOneSet & kOneS2Set)) {
1976 perp.setPerp(sect2->fCurve, 1, sect2->pointLast(), sect1->fCurve);
1982 if (!sect1->fHead || !sect2->fHead) {
1986 sect2->recoverCollapsed();
1994 if (sect2->fCurve.ptAtT(t).approximatelyEqual(start1)) {
1999 const SkTSpan* head2 = sect2->fHead;
2001 const SkDPoint& start2 = sect2->fCurve[0];
2018 if (sect2->fCurve.ptAtT(t).approximatelyEqual(end1)) {
2025 const SkTSpan* tail2 = sect2->tail();
2030 const SkDPoint& end2 = sect2->pointLast();
2047 SkTSpan* result2 = sect2->fHead;
2065 perp.setPerp(sect1->fCurve, midT, midPt, sect2->fCurve);
2088 SkTSect sect2(quad2 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
2089 SkTSect::BinarySearch(§1, §2, this);
2097 SkTSect sect2(quad SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
2098 SkTSect::BinarySearch(§1, §2, this);
2106 SkTSect sect2(conic2 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
2107 SkTSect::BinarySearch(§1, §2, this);
2115 SkTSect sect2(quad SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
2116 SkTSect::BinarySearch(§1, §2, this);
2124 SkTSect sect2(conic SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
2125 SkTSect::BinarySearch(§1, §2, this);
2134 SkTSect sect2(cubic2 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
2135 SkTSect::BinarySearch(§1, §2, this);