Lines Matching refs:TCurve

23 template<typename TCurve, typename OppCurve>
67 void setPerp(const TCurve& c1, double t, const SkDPoint& cPt, const OppCurve& );
75 template<typename TCurve, typename OppCurve> class SkTSect;
76 template<typename TCurve, typename OppCurve> class SkTSpan;
78 template<typename TCurve, typename OppCurve>
80 SkTSpan<TCurve, OppCurve>* fBounded;
85 template<typename TCurve, typename OppCurve>
88 void addBounded(SkTSpan<OppCurve, TCurve>* , SkArenaAlloc* );
93 TCurve dummy; in debugInit()
101 const SkTSect<OppCurve, TCurve>* debugOpp() const;
124 SkTSpan<OppCurve, TCurve>* findOppSpan(const SkTSpan<OppCurve, TCurve>* opp) const;
126 SkTSpan<OppCurve, TCurve>* findOppT(double t) const { in findOppT()
127 SkTSpan<OppCurve, TCurve>* result = oppT(t); in findOppT()
138 int hullsIntersect(SkTSpan<OppCurve, TCurve>* span, bool* start, bool* oppStart);
139 void init(const TCurve& );
140 bool initBounds(const TCurve& );
146 bool linearsIntersect(SkTSpan<OppCurve, TCurve>* span);
158 bool onlyEndPointsInCommon(const SkTSpan<OppCurve, TCurve>* opp, bool* start,
161 const TCurve& part() const { in part()
166 bool removeBounded(const SkTSpan<OppCurve, TCurve>* opp);
172 void resetBounds(const TCurve& curve) { in resetBounds()
196 int hullCheck(const SkTSpan<OppCurve, TCurve>* opp, bool* start, bool* oppStart);
198 SkTSpan<OppCurve, TCurve>* oppT(double t) const;
205 TCurve fPart;
206 SkTCoincident<TCurve, OppCurve> fCoinStart;
207 SkTCoincident<TCurve, OppCurve> fCoinEnd;
208 SkTSpanBounded<OppCurve, TCurve>* fBounded;
221 SkDEBUGCODE(SkTSect<TCurve, OppCurve>* fDebugSect);
223 friend class SkTSect<TCurve, OppCurve>;
224 friend class SkTSect<OppCurve, TCurve>;
225 friend class SkTSpan<OppCurve, TCurve>;
228 template<typename TCurve, typename OppCurve>
231 SkTSect(const TCurve& c SkDEBUGPARAMS(SkOpGlobalState* ) PATH_OPS_DEBUG_T_SECT_PARAMS(int id));
232 static void BinarySearch(SkTSect* sect1, SkTSect<OppCurve, TCurve>* sect2,
237 bool debugHasBounded(const SkTSpan<OppCurve, TCurve>* ) const;
239 const SkTSect<OppCurve, TCurve>* debugOpp() const { in debugOpp()
243 const SkTSpan<TCurve, OppCurve>* debugSpan(int id) const;
244 const SkTSpan<TCurve, OppCurve>* debugT(double t) const;
246 void dumpBoth(SkTSect<OppCurve, TCurve>* ) const;
261 SkTSpan<TCurve, OppCurve>* addFollowing(SkTSpan<TCurve, OppCurve>* prior);
262 void addForPerp(SkTSpan<OppCurve, TCurve>* span, double t);
263 SkTSpan<TCurve, OppCurve>* addOne();
265 SkTSpan<TCurve, OppCurve>* addSplitAt(SkTSpan<TCurve, OppCurve>* span, double t) { in addSplitAt() argument
266 SkTSpan<TCurve, OppCurve>* result = this->addOne(); in addSplitAt()
274 bool binarySearchCoin(SkTSect<OppCurve, TCurve>* , double tStart, double tStep, double* t,
276 SkTSpan<TCurve, OppCurve>* boundsMax() const;
277 bool coincidentCheck(SkTSect<OppCurve, TCurve>* sect2);
278 void coincidentForce(SkTSect<OppCurve, TCurve>* sect2, double start1s, double start1e);
281 void computePerpendiculars(SkTSect<OppCurve, TCurve>* sect2, SkTSpan<TCurve, OppCurve>* first,
282 SkTSpan<TCurve, OppCurve>* last);
283 int countConsecutiveSpans(SkTSpan<TCurve, OppCurve>* first,
284 SkTSpan<TCurve, OppCurve>** last) const;
291 void dumpCommon(const SkTSpan<TCurve, OppCurve>* ) const;
292 void dumpCommonCurves(const SkTSpan<TCurve, OppCurve>* ) const;
293 static int EndsEqual(const SkTSect* sect1, const SkTSect<OppCurve, TCurve>* sect2,
295 bool extractCoincident(SkTSect<OppCurve, TCurve>* sect2, SkTSpan<TCurve, OppCurve>* first,
296 SkTSpan<TCurve, OppCurve>* last, SkTSpan<TCurve, OppCurve>** result);
297 SkTSpan<TCurve, OppCurve>* findCoincidentRun(SkTSpan<TCurve, OppCurve>* first,
298 SkTSpan<TCurve, OppCurve>** lastPtr);
299 int intersects(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp,
300 SkTSpan<OppCurve, TCurve>* oppSpan, int* oppResult);
301 bool isParallel(const SkDLine& thisLine, const SkTSect<OppCurve, TCurve>* opp) const;
302 int linesIntersect(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp,
303 SkTSpan<OppCurve, TCurve>* oppSpan, SkIntersections* );
304 bool markSpanGone(SkTSpan<TCurve, OppCurve>* span);
305 bool matchedDirection(double t, const SkTSect<OppCurve, TCurve>* sect2, double t2) const;
306 void matchedDirCheck(double t, const SkTSect<OppCurve, TCurve>* sect2, double t2,
308 void mergeCoincidence(SkTSect<OppCurve, TCurve>* sect2);
309 SkTSpan<TCurve, OppCurve>* prev(SkTSpan<TCurve, OppCurve>* ) const;
310 void removeByPerpendicular(SkTSect<OppCurve, TCurve>* opp);
312 void removeCoincident(SkTSpan<TCurve, OppCurve>* span, bool isBetween);
313 void removeAllBut(const SkTSpan<OppCurve, TCurve>* keep, SkTSpan<TCurve, OppCurve>* span,
314 SkTSect<OppCurve, TCurve>* opp);
315 bool removeSpan(SkTSpan<TCurve, OppCurve>* span);
316 void removeSpanRange(SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last);
317 void removeSpans(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp);
318 void removedEndCheck(SkTSpan<TCurve, OppCurve>* span);
324 SkTSpan<TCurve, OppCurve>* spanAtT(double t, SkTSpan<TCurve, OppCurve>** priorSpan);
325 SkTSpan<TCurve, OppCurve>* tail();
326 bool trim(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp);
327 void unlinkSpan(SkTSpan<TCurve, OppCurve>* span);
328 bool updateBounded(SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last,
329 SkTSpan<OppCurve, TCurve>* oppFirst);
333 const TCurve& fCurve;
335 SkTSpan<TCurve, OppCurve>* fHead;
336 SkTSpan<TCurve, OppCurve>* fCoincident;
337 SkTSpan<TCurve, OppCurve>* fDeleted;
342 SkDEBUGCODE(SkTSect<OppCurve, TCurve>* fOppSect);
348 friend class SkTSpan<TCurve, OppCurve>;
349 friend class SkTSpan<OppCurve, TCurve>;
350 friend class SkTSect<OppCurve, TCurve>;
355 template<typename TCurve, typename OppCurve>
356 void SkTCoincident<TCurve, OppCurve>::setPerp(const TCurve& c1, double t, in setPerp()
391 template<typename TCurve, typename OppCurve>
392 void SkTSpan<TCurve, OppCurve>::addBounded(SkTSpan<OppCurve, TCurve>* span, SkArenaAlloc* heap) { in addBounded()
393 SkTSpanBounded<OppCurve, TCurve>* bounded = heap->make<SkTSpanBounded<OppCurve, TCurve>>(); in addBounded()
399 template<typename TCurve, typename OppCurve>
400 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::addFollowing( in addFollowing() argument
401 SkTSpan<TCurve, OppCurve>* prior) { in addFollowing()
402 SkTSpan<TCurve, OppCurve>* result = this->addOne(); in addFollowing()
405 SkTSpan<TCurve, OppCurve>* next = prior ? prior->fNext : fHead; in addFollowing()
422 template<typename TCurve, typename OppCurve>
423 void SkTSect<TCurve, OppCurve>::addForPerp(SkTSpan<OppCurve, TCurve>* span, double t) { in addForPerp()
425 SkTSpan<TCurve, OppCurve>* priorSpan; in addForPerp()
426 SkTSpan<TCurve, OppCurve>* opp = this->spanAtT(t, &priorSpan); in addForPerp()
448 template<typename TCurve, typename OppCurve>
449 double SkTSpan<TCurve, OppCurve>::closestBoundedT(const SkDPoint& pt) const { in closestBoundedT()
452 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; in closestBoundedT()
454 const SkTSpan<OppCurve, TCurve>* test = testBounded->fBounded; in closestBoundedT()
472 template<typename TCurve, typename OppCurve>
473 bool SkTSpan<TCurve, OppCurve>::debugIsBefore(const SkTSpan* span) const { in debugIsBefore()
484 template<typename TCurve, typename OppCurve>
485 bool SkTSpan<TCurve, OppCurve>::contains(double t) const { in contains()
495 template<typename TCurve, typename OppCurve>
496 const SkTSect<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::debugOpp() const { in debugOpp()
500 template<typename TCurve, typename OppCurve>
501 SkTSpan<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::findOppSpan( in findOppSpan()
502 const SkTSpan<OppCurve, TCurve>* opp) const { in findOppSpan()
503 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in findOppSpan()
505 SkTSpan<OppCurve, TCurve>* test = bounded->fBounded; in findOppSpan()
518 template<typename TCurve, typename OppCurve>
519 int SkTSpan<TCurve, OppCurve>::hullCheck(const SkTSpan<OppCurve, TCurve>* opp, in hullCheck()
546 template<typename TCurve, typename OppCurve>
547 int SkTSpan<TCurve, OppCurve>::hullsIntersect(SkTSpan<OppCurve, TCurve>* opp, in hullsIntersect()
563 template<typename TCurve, typename OppCurve>
564 void SkTSpan<TCurve, OppCurve>::init(const TCurve& c) { in init()
572 template<typename TCurve, typename OppCurve>
573 bool SkTSpan<TCurve, OppCurve>::initBounds(const TCurve& c) { in initBounds()
590 template<typename TCurve, typename OppCurve>
591 bool SkTSpan<TCurve, OppCurve>::linearsIntersect(SkTSpan<OppCurve, TCurve>* span) { in linearsIntersect()
602 template<typename TCurve, typename OppCurve>
603 double SkTSpan<TCurve, OppCurve>::linearT(const SkDPoint& pt) const { in linearT()
604 SkDVector len = fPart[TCurve::kPointLast] - fPart[0]; in linearT()
610 template<typename TCurve, typename OppCurve>
611 int SkTSpan<TCurve, OppCurve>::linearIntersects(const OppCurve& q2) const { in linearIntersects()
613 int start = 0, end = TCurve::kPointLast; // the outside points are usually the extremes in linearIntersects()
616 for (int outer = 0; outer < TCurve::kPointCount - 1; ++outer) { in linearIntersects()
617 for (int inner = outer + 1; inner < TCurve::kPointCount; ++inner) { in linearIntersects()
657 template<typename TCurve, typename OppCurve>
658 bool SkTSpan<TCurve, OppCurve>::onlyEndPointsInCommon(const SkTSpan<OppCurve, TCurve>* opp, in onlyEndPointsInCommon()
662 } else if (opp->fPart[0] == fPart[TCurve::kPointLast]) { in onlyEndPointsInCommon()
668 } else if (opp->fPart[OppCurve::kPointLast] == fPart[TCurve::kPointLast]) { in onlyEndPointsInCommon()
675 const SkDPoint* otherPts[TCurve::kPointCount - 1], * oppOtherPts[OppCurve::kPointCount - 1]; in onlyEndPointsInCommon()
676 int baseIndex = *start ? 0 : TCurve::kPointLast; in onlyEndPointsInCommon()
692 template<typename TCurve, typename OppCurve>
693 SkTSpan<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::oppT(double t) const { in oppT()
694 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in oppT()
696 SkTSpan<OppCurve, TCurve>* test = bounded->fBounded; in oppT()
705 template<typename TCurve, typename OppCurve>
706 bool SkTSpan<TCurve, OppCurve>::removeAllBounded() { in removeAllBounded()
708 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in removeAllBounded()
710 SkTSpan<OppCurve, TCurve>* opp = bounded->fBounded; in removeAllBounded()
717 template<typename TCurve, typename OppCurve>
718 bool SkTSpan<TCurve, OppCurve>::removeBounded(const SkTSpan<OppCurve, TCurve>* opp) { in removeBounded()
722 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in removeBounded()
724 SkTSpan<OppCurve, TCurve>* test = bounded->fBounded; in removeBounded()
737 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in removeBounded()
738 SkTSpanBounded<OppCurve, TCurve>* prev = nullptr; in removeBounded()
740 SkTSpanBounded<OppCurve, TCurve>* boundedNext = bounded->fNext; in removeBounded()
757 template<typename TCurve, typename OppCurve>
758 bool SkTSpan<TCurve, OppCurve>::splitAt(SkTSpan* work, double t, SkArenaAlloc* heap) { in splitAt()
780 SkTSpanBounded<OppCurve, TCurve>* bounded = work->fBounded; in splitAt()
794 template<typename TCurve, typename OppCurve>
795 void SkTSpan<TCurve, OppCurve>::validate() const { in validate()
824 template<typename TCurve, typename OppCurve>
825 void SkTSpan<TCurve, OppCurve>::validateBounded() const { in validateBounded()
827 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; in validateBounded()
829 SkDEBUGCODE(const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBounded); in validateBounded()
840 template<typename TCurve, typename OppCurve>
841 void SkTSpan<TCurve, OppCurve>::validatePerpT(double oppT) const { in validatePerpT()
842 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; in validatePerpT()
844 const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBounded; in validatePerpT()
853 template<typename TCurve, typename OppCurve>
854 void SkTSpan<TCurve, OppCurve>::validatePerpPt(double t, const SkDPoint& pt) const { in validatePerpPt()
859 template<typename TCurve, typename OppCurve>
860 SkTSect<TCurve, OppCurve>::SkTSect(const TCurve& c in SkTSect()
864 , fHeap(sizeof(SkTSpan<TCurve, OppCurve>) * 4) in SkTSect()
879 template<typename TCurve, typename OppCurve>
880 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::addOne() { in addOne()
881 SkTSpan<TCurve, OppCurve>* result; in addOne()
886 result = fHeap.make<SkTSpan<TCurve, OppCurve>>(); in addOne()
909 template<typename TCurve, typename OppCurve>
910 bool SkTSect<TCurve, OppCurve>::binarySearchCoin(SkTSect<OppCurve, TCurve>* sect2, double tStart, in binarySearchCoin()
912 SkTSpan<TCurve, OppCurve> work; in binarySearchCoin()
959 } else if (last.approximatelyEqual(fCurve[TCurve::kPointLast])) { in binarySearchCoin()
974 template<typename TCurve, typename OppCurve>
975 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::boundsMax() const { in boundsMax()
976 SkTSpan<TCurve, OppCurve>* test = fHead; in boundsMax()
977 SkTSpan<TCurve, OppCurve>* largest = fHead; in boundsMax()
990 template<typename TCurve, typename OppCurve>
991 bool SkTSect<TCurve, OppCurve>::coincidentCheck(SkTSect<OppCurve, TCurve>* sect2) { in coincidentCheck()
992 SkTSpan<TCurve, OppCurve>* first = fHead; in coincidentCheck()
996 SkTSpan<TCurve, OppCurve>* last, * next; in coincidentCheck()
1009 SkTSpan<TCurve, OppCurve>* coinStart = first; in coincidentCheck()
1026 template<typename TCurve, typename OppCurve>
1027 void SkTSect<TCurve, OppCurve>::coincidentForce(SkTSect<OppCurve, TCurve>* sect2, in coincidentForce()
1029 SkTSpan<TCurve, OppCurve>* first = fHead; in coincidentForce()
1030 SkTSpan<TCurve, OppCurve>* last = this->tail(); in coincidentForce()
1031 SkTSpan<OppCurve, TCurve>* oppFirst = sect2->fHead; in coincidentForce()
1032 SkTSpan<OppCurve, TCurve>* oppLast = sect2->tail(); in coincidentForce()
1041 first->fCoinEnd.setPerp(fCurve, start1e, fCurve[TCurve::kPointLast], sect2->fCurve); in coincidentForce()
1059 template<typename TCurve, typename OppCurve>
1060 bool SkTSect<TCurve, OppCurve>::coincidentHasT(double t) { in coincidentHasT()
1061 SkTSpan<TCurve, OppCurve>* test = fCoincident; in coincidentHasT()
1071 template<typename TCurve, typename OppCurve>
1072 int SkTSect<TCurve, OppCurve>::collapsed() const { in collapsed()
1074 const SkTSpan<TCurve, OppCurve>* test = fHead; in collapsed()
1084 template<typename TCurve, typename OppCurve>
1085 void SkTSect<TCurve, OppCurve>::computePerpendiculars(SkTSect<OppCurve, TCurve>* sect2, in computePerpendiculars()
1086 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) { in computePerpendiculars() argument
1088 SkTSpan<TCurve, OppCurve>* work = first; in computePerpendiculars()
1089 SkTSpan<TCurve, OppCurve>* prior = nullptr; in computePerpendiculars()
1105 work->fCoinEnd.setPerp(fCurve, work->fEndT, work->fPart[TCurve::kPointLast], opp); in computePerpendiculars()
1125 template<typename TCurve, typename OppCurve>
1126 int SkTSect<TCurve, OppCurve>::countConsecutiveSpans(SkTSpan<TCurve, OppCurve>* first, in countConsecutiveSpans() argument
1127 SkTSpan<TCurve, OppCurve>** lastPtr) const { in countConsecutiveSpans()
1129 SkTSpan<TCurve, OppCurve>* last = first; in countConsecutiveSpans()
1131 SkTSpan<TCurve, OppCurve>* next = last->fNext; in countConsecutiveSpans()
1145 template<typename TCurve, typename OppCurve>
1146 bool SkTSect<TCurve, OppCurve>::debugHasBounded(const SkTSpan<OppCurve, TCurve>* span) const { in debugHasBounded()
1147 const SkTSpan<TCurve, OppCurve>* test = fHead; in debugHasBounded()
1159 template<typename TCurve, typename OppCurve>
1160 bool SkTSect<TCurve, OppCurve>::deleteEmptySpans() { in deleteEmptySpans()
1161 SkTSpan<TCurve, OppCurve>* test; in deleteEmptySpans()
1162 SkTSpan<TCurve, OppCurve>* next = fHead; in deleteEmptySpans()
1178 template<typename TCurve, typename OppCurve>
1179 bool SkTSect<TCurve, OppCurve>::extractCoincident( in extractCoincident()
1180 SkTSect<OppCurve, TCurve>* sect2, in extractCoincident()
1181 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last, in extractCoincident() argument
1182 SkTSpan<TCurve, OppCurve>** result) { in extractCoincident()
1192 SkTSpan<TCurve, OppCurve>* prev = first->fPrev; in extractCoincident()
1194 SkTSpan<OppCurve, TCurve>* oppFirst = first->findOppT(first->fCoinStart.perpT()); in extractCoincident()
1199 SkTSpan<OppCurve, TCurve>* cutFirst; in extractCoincident()
1210 SkTSpan<OppCurve, TCurve>* oppHalf = sect2->addSplitAt(oppFirst, oppStartT); in extractCoincident()
1226 SkTSpan<OppCurve, TCurve>* oppLast; in extractCoincident()
1262 first->fCoinEnd.setPerp(fCurve, first->fEndT, first->fPart[TCurve::kPointLast], sect2->fCurve); in extractCoincident()
1290 template<typename TCurve, typename OppCurve>
1291 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::findCoincidentRun( in findCoincidentRun() argument
1292 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>** lastPtr) { in findCoincidentRun()
1293 SkTSpan<TCurve, OppCurve>* work = first; in findCoincidentRun()
1294 SkTSpan<TCurve, OppCurve>* lastCandidate = nullptr; in findCoincidentRun()
1332 template<typename TCurve, typename OppCurve>
1333 int SkTSect<TCurve, OppCurve>::intersects(SkTSpan<TCurve, OppCurve>* span, in intersects() argument
1334 SkTSect<OppCurve, TCurve>* opp, in intersects()
1335 SkTSpan<OppCurve, TCurve>* oppSpan, int* oppResult) { in intersects()
1387 template<typename TCurve>
1388 static bool is_parallel(const SkDLine& thisLine, const TCurve& opp) { in is_parallel()
1415 template<typename TCurve, typename OppCurve>
1416 int SkTSect<TCurve, OppCurve>::linesIntersect(SkTSpan<TCurve, OppCurve>* span, in linesIntersect() argument
1417 SkTSect<OppCurve, TCurve>* opp, in linesIntersect()
1418 SkTSpan<OppCurve, TCurve>* oppSpan, SkIntersections* i) { in linesIntersect()
1421 SkDLine thisLine = {{ span->fPart[0], span->fPart[TCurve::kPointLast] }}; in linesIntersect()
1505 SkTCoincident<OppCurve, TCurve> oCoinS, oCoinE; in linesIntersect()
1521 SkTCoincident<TCurve, OppCurve> coinS; in linesIntersect()
1530 SkTCoincident<TCurve, OppCurve> coinE; in linesIntersect()
1531 coinE.setPerp(fCurve, span->fEndT, span->fPart[TCurve::kPointLast], opp->fCurve); in linesIntersect()
1532 perpE = span->fPart[TCurve::kPointLast] - coinE.perpPt(); in linesIntersect()
1541 SkTCoincident<TCurve, OppCurve> coinW; in linesIntersect()
1575 template<typename TCurve, typename OppCurve>
1576 bool SkTSect<TCurve, OppCurve>::markSpanGone(SkTSpan<TCurve, OppCurve>* span) { in markSpanGone() argument
1587 template<typename TCurve, typename OppCurve>
1588 bool SkTSect<TCurve, OppCurve>::matchedDirection(double t, const SkTSect<OppCurve, TCurve>* sect2, in matchedDirection()
1595 template<typename TCurve, typename OppCurve>
1596 void SkTSect<TCurve, OppCurve>::matchedDirCheck(double t, const SkTSect<OppCurve, TCurve>* sect2, in matchedDirCheck()
1606 template<typename TCurve, typename OppCurve>
1607 void SkTSect<TCurve, OppCurve>::mergeCoincidence(SkTSect<OppCurve, TCurve>* sect2) { in mergeCoincidence()
1611 SkTSpan<TCurve, OppCurve>* smaller = nullptr; in mergeCoincidence()
1612 SkTSpan<TCurve, OppCurve>* test = fCoincident; in mergeCoincidence()
1630 SkTSpan<TCurve, OppCurve>* prior = nullptr; in mergeCoincidence()
1631 SkTSpan<TCurve, OppCurve>* larger = nullptr; in mergeCoincidence()
1632 SkTSpan<TCurve, OppCurve>* largerPrior = nullptr; in mergeCoincidence()
1651 SkTCoincident<TCurve, OppCurve> coin; in mergeCoincidence()
1666 template<typename TCurve, typename OppCurve>
1667 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::prev( in prev() argument
1668 SkTSpan<TCurve, OppCurve>* span) const { in prev()
1669 SkTSpan<TCurve, OppCurve>* result = nullptr; in prev()
1670 SkTSpan<TCurve, OppCurve>* test = fHead; in prev()
1679 template<typename TCurve, typename OppCurve>
1680 void SkTSect<TCurve, OppCurve>::recoverCollapsed() { in recoverCollapsed()
1681 SkTSpan<TCurve, OppCurve>* deleted = fDeleted; in recoverCollapsed()
1683 SkTSpan<TCurve, OppCurve>* delNext = deleted->fNext; in recoverCollapsed()
1685 SkTSpan<TCurve, OppCurve>** spanPtr = &fHead; in recoverCollapsed()
1696 template<typename TCurve, typename OppCurve>
1697 void SkTSect<TCurve, OppCurve>::removeAllBut(const SkTSpan<OppCurve, TCurve>* keep, in removeAllBut()
1698 SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp) { in removeAllBut() argument
1699 const SkTSpanBounded<OppCurve, TCurve>* testBounded = span->fBounded; in removeAllBut()
1701 SkTSpan<OppCurve, TCurve>* bounded = testBounded->fBounded; in removeAllBut()
1702 const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; in removeAllBut()
1717 template<typename TCurve, typename OppCurve>
1718 void SkTSect<TCurve, OppCurve>::removeByPerpendicular(SkTSect<OppCurve, TCurve>* opp) { in removeByPerpendicular()
1719 SkTSpan<TCurve, OppCurve>* test = fHead; in removeByPerpendicular()
1720 SkTSpan<TCurve, OppCurve>* next; in removeByPerpendicular()
1727 SkDVector endV = test->fCoinEnd.perpPt() - test->fPart[TCurve::kPointLast]; in removeByPerpendicular()
1739 template<typename TCurve, typename OppCurve>
1740 void SkTSect<TCurve, OppCurve>::removeCoincident(SkTSpan<TCurve, OppCurve>* span, bool isBetween) { in removeCoincident() argument
1751 template<typename TCurve, typename OppCurve>
1752 void SkTSect<TCurve, OppCurve>::removedEndCheck(SkTSpan<TCurve, OppCurve>* span) { in removedEndCheck() argument
1761 template<typename TCurve, typename OppCurve>
1762 bool SkTSect<TCurve, OppCurve>::removeSpan(SkTSpan<TCurve, OppCurve>* span) {\ in removeSpan() argument
1768 template<typename TCurve, typename OppCurve>
1769 void SkTSect<TCurve, OppCurve>::removeSpanRange(SkTSpan<TCurve, OppCurve>* first, in removeSpanRange() argument
1770 SkTSpan<TCurve, OppCurve>* last) { in removeSpanRange()
1774 SkTSpan<TCurve, OppCurve>* span = first; in removeSpanRange()
1776 SkTSpan<TCurve, OppCurve>* final = last->fNext; in removeSpanRange()
1777 SkTSpan<TCurve, OppCurve>* next = span->fNext; in removeSpanRange()
1789 template<typename TCurve, typename OppCurve>
1790 void SkTSect<TCurve, OppCurve>::removeSpans(SkTSpan<TCurve, OppCurve>* span, in removeSpans() argument
1791 SkTSect<OppCurve, TCurve>* opp) { in removeSpans()
1792 SkTSpanBounded<OppCurve, TCurve>* bounded = span->fBounded; in removeSpans()
1794 SkTSpan<OppCurve, TCurve>* spanBounded = bounded->fBounded; in removeSpans()
1795 SkTSpanBounded<OppCurve, TCurve>* next = bounded->fNext; in removeSpans()
1807 template<typename TCurve, typename OppCurve>
1808 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::spanAtT(double t, in spanAtT() argument
1809 SkTSpan<TCurve, OppCurve>** priorSpan) { in spanAtT()
1810 SkTSpan<TCurve, OppCurve>* test = fHead; in spanAtT()
1811 SkTSpan<TCurve, OppCurve>* prev = nullptr; in spanAtT()
1820 template<typename TCurve, typename OppCurve>
1821 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::tail() { in tail()
1822 SkTSpan<TCurve, OppCurve>* result = fHead; in tail()
1823 SkTSpan<TCurve, OppCurve>* next = fHead; in tail()
1834 template<typename TCurve, typename OppCurve>
1835 bool SkTSect<TCurve, OppCurve>::trim(SkTSpan<TCurve, OppCurve>* span, in trim() argument
1836 SkTSect<OppCurve, TCurve>* opp) { in trim()
1838 const SkTSpanBounded<OppCurve, TCurve>* testBounded = span->fBounded; in trim()
1840 SkTSpan<OppCurve, TCurve>* test = testBounded->fBounded; in trim()
1841 const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; in trim()
1866 template<typename TCurve, typename OppCurve>
1867 void SkTSect<TCurve, OppCurve>::unlinkSpan(SkTSpan<TCurve, OppCurve>* span) { in unlinkSpan() argument
1868 SkTSpan<TCurve, OppCurve>* prev = span->fPrev; in unlinkSpan()
1869 SkTSpan<TCurve, OppCurve>* next = span->fNext; in unlinkSpan()
1884 template<typename TCurve, typename OppCurve>
1885 bool SkTSect<TCurve, OppCurve>::updateBounded(SkTSpan<TCurve, OppCurve>* first, in updateBounded() argument
1886 SkTSpan<TCurve, OppCurve>* last, SkTSpan<OppCurve, TCurve>* oppFirst) { in updateBounded()
1887 SkTSpan<TCurve, OppCurve>* test = first; in updateBounded()
1888 const SkTSpan<TCurve, OppCurve>* final = last->next(); in updateBounded()
1900 template<typename TCurve, typename OppCurve>
1901 void SkTSect<TCurve, OppCurve>::validate() const { in validate()
1906 const SkTSpan<TCurve, OppCurve>* span = fHead; in validate()
1908 const SkTSpan<TCurve, OppCurve>* next; in validate()
1923 const SkTSpan<TCurve, OppCurve>* deleted = fDeleted; in validate()
1928 const SkTSpan<TCurve, OppCurve>* coincident = fCoincident; in validate()
1937 template<typename TCurve, typename OppCurve>
1938 void SkTSect<TCurve, OppCurve>::validateBounded() const { in validateBounded()
1943 const SkTSpan<TCurve, OppCurve>* span = fHead; in validateBounded()
1950 template<typename TCurve, typename OppCurve>
1951 int SkTSect<TCurve, OppCurve>::EndsEqual(const SkTSect<TCurve, OppCurve>* sect1, in EndsEqual() argument
1952 const SkTSect<OppCurve, TCurve>* sect2, SkIntersections* intersections) { in EndsEqual()
1962 if (sect1->fCurve[TCurve::kPointLast] == sect2->fCurve[0]) { in EndsEqual()
1964 intersections->insert(1, 0, sect1->fCurve[TCurve::kPointLast]); in EndsEqual()
1966 if (sect1->fCurve[TCurve::kPointLast] == sect2->fCurve[OppCurve::kPointLast]) { in EndsEqual()
1968 intersections->insert(1, 1, sect1->fCurve[TCurve::kPointLast]); in EndsEqual()
1983 && sect1->fCurve[TCurve::kPointLast].approximatelyEqual(sect2->fCurve[0])) { in EndsEqual()
1985 intersections->insertNear(1, 0, sect1->fCurve[TCurve::kPointLast], sect2->fCurve[0]); in EndsEqual()
1988 && sect1->fCurve[TCurve::kPointLast].approximatelyEqual(sect2->fCurve[ in EndsEqual()
1991 intersections->insertNear(1, 1, sect1->fCurve[TCurve::kPointLast], in EndsEqual()
1997 template<typename TCurve, typename OppCurve>
2009 void findEnd(const SkTSpan<TCurve, OppCurve>* span1, const SkTSpan<OppCurve, TCurve>* span2, in findEnd()
2011 const TCurve& c1 = span1->part(); in findEnd()
2065 const SkTSpan<TCurve, OppCurve>* fC1Span;
2066 const SkTSpan<OppCurve, TCurve>* fC2Span;
2076 template<typename TCurve, typename OppCurve>
2083 bool find(const SkTSpan<TCurve, OppCurve>* span1, const SkTSpan<OppCurve, TCurve>* span2 in find()
2085 SkClosestRecord<TCurve, OppCurve>* record = &fClosest[fUsed]; in find()
2088 record->findEnd(span1, span2, TCurve::kPointLast, 0); in find()
2089 record->findEnd(span1, span2, TCurve::kPointLast, OppCurve::kPointLast); in find()
2094 SkClosestRecord<TCurve, OppCurve>* test = &fClosest[index]; in find()
2110 SkSTArray<TCurve::kMaxIntersections * 3, in finish()
2111 const SkClosestRecord<TCurve, OppCurve>*, true> closestPtrs; in finish()
2115 SkTQSort<const SkClosestRecord<TCurve, OppCurve> >(closestPtrs.begin(), closestPtrs.end() in finish()
2118 const SkClosestRecord<TCurve, OppCurve>* test = closestPtrs[index]; in finish()
2124 SkSTArray<TCurve::kMaxIntersections * 2, SkClosestRecord<TCurve, OppCurve>, true> fClosest;
2129 template<typename TCurve, typename OppCurve>
2130 void SkTSect<TCurve, OppCurve>::BinarySearch(SkTSect<TCurve, OppCurve>* sect1, in BinarySearch() argument
2131 SkTSect<OppCurve, TCurve>* sect2, SkIntersections* intersections) { in BinarySearch()
2138 intersections->setMax(TCurve::kMaxIntersections + 4); // give extra for slop in BinarySearch()
2139 SkTSpan<TCurve, OppCurve>* span1 = sect1->fHead; in BinarySearch()
2140 SkTSpan<OppCurve, TCurve>* span2 = sect2->fHead; in BinarySearch()
2158 SkTSpan<TCurve, OppCurve>* largest1 = sect1->boundsMax(); in BinarySearch()
2162 SkTSpan<OppCurve, TCurve>* largest2 = sect2->boundsMax(); in BinarySearch()
2172 SkTSpan<TCurve, OppCurve>* half1 = sect1->addOne(); in BinarySearch()
2192 SkTSpan<OppCurve, TCurve>* half2 = sect2->addOne(); in BinarySearch()
2253 if (sect1->collapsed() > TCurve::kMaxIntersections) { in BinarySearch()
2264 SkTSpan<TCurve, OppCurve>* coincident = sect1->fCoincident; in BinarySearch()
2290 coincident->fPart[TCurve::kPointLast]) < 0) && index >= 0) { in BinarySearch()
2299 SkTCoincident<TCurve, OppCurve> perp; // intersect perpendicular with opposite curve in BinarySearch()
2306 SkTCoincident<TCurve, OppCurve> perp; in BinarySearch()
2307 perp.setPerp(sect1->fCurve, 1, sect1->fCurve[TCurve::kPointLast], sect2->fCurve); in BinarySearch()
2313 SkTCoincident<OppCurve, TCurve> perp; in BinarySearch()
2320 SkTCoincident<OppCurve, TCurve> perp; in BinarySearch()
2332 SkTSpan<TCurve, OppCurve>* result1 = sect1->fHead; in BinarySearch()
2334 const SkTSpan<TCurve, OppCurve>* head1 = result1; in BinarySearch()
2344 const SkTSpan<OppCurve, TCurve>* head2 = sect2->fHead; in BinarySearch()
2354 const SkTSpan<TCurve, OppCurve>* tail1 = sect1->tail(); in BinarySearch()
2356 const SkDPoint& end1 = sect1->fCurve[TCurve::kPointLast]; in BinarySearch()
2364 const SkTSpan<OppCurve, TCurve>* tail2 = sect2->tail(); in BinarySearch()
2374 SkClosestSect<TCurve, OppCurve> closest; in BinarySearch()
2382 SkTSpan<OppCurve, TCurve>* result2 = sect2->fHead; in BinarySearch()
2400 SkTCoincident<TCurve, OppCurve> perp; in BinarySearch()
2417 SkOPOBJASSERT(intersections, intersections->used() <= TCurve::kMaxIntersections); in BinarySearch()