• Home
  • Raw
  • Download

Lines Matching refs:TCurve

15 template<typename TCurve, typename OppCurve>
49 void setPerp(const TCurve& c1, double t, const SkDPoint& cPt, const OppCurve& );
57 template<typename TCurve, typename OppCurve> class SkTSect;
58 template<typename TCurve, typename OppCurve> class SkTSpan;
60 template<typename TCurve, typename OppCurve>
62 SkTSpan<TCurve, OppCurve>* fBounded;
67 template<typename TCurve, typename OppCurve>
70 void addBounded(SkTSpan<OppCurve, TCurve>* , SkChunkAlloc* );
75 TCurve dummy; in debugInit()
83 const SkTSect<OppCurve, TCurve>* debugOpp() const;
98 SkTSpan<OppCurve, TCurve>* findOppSpan(const SkTSpan<OppCurve, TCurve>* opp) const;
100 SkTSpan<OppCurve, TCurve>* findOppT(double t) const { in findOppT()
101 SkTSpan<OppCurve, TCurve>* result = oppT(t); in findOppT()
110 int hullsIntersect(SkTSpan<OppCurve, TCurve>* span, bool* start, bool* oppStart);
111 void init(const TCurve& );
112 void initBounds(const TCurve& );
118 bool linearsIntersect(SkTSpan<OppCurve, TCurve>* span);
130 bool onlyEndPointsInCommon(const SkTSpan<OppCurve, TCurve>* opp, bool* start,
133 const TCurve& part() const { in part()
138 bool removeBounded(const SkTSpan<OppCurve, TCurve>* opp);
144 void resetBounds(const TCurve& curve) { in resetBounds()
168 int hullCheck(const SkTSpan<OppCurve, TCurve>* opp, bool* start, bool* oppStart);
170 SkTSpan<OppCurve, TCurve>* oppT(double t) const;
177 TCurve fPart;
178 SkTCoincident<TCurve, OppCurve> fCoinStart;
179 SkTCoincident<TCurve, OppCurve> fCoinEnd;
180 SkTSpanBounded<OppCurve, TCurve>* fBounded;
192 SkDEBUGCODE_(SkTSect<TCurve, OppCurve>* fDebugSect);
194 friend class SkTSect<TCurve, OppCurve>;
195 friend class SkTSect<OppCurve, TCurve>;
196 friend class SkTSpan<OppCurve, TCurve>;
199 template<typename TCurve, typename OppCurve>
202 SkTSect(const TCurve& c PATH_OPS_DEBUG_T_SECT_PARAMS(int id));
203 static void BinarySearch(SkTSect* sect1, SkTSect<OppCurve, TCurve>* sect2,
207 bool debugHasBounded(const SkTSpan<OppCurve, TCurve>* ) const;
209 const SkTSect<OppCurve, TCurve>* debugOpp() const { in debugOpp()
213 const SkTSpan<TCurve, OppCurve>* debugSpan(int id) const;
214 const SkTSpan<TCurve, OppCurve>* debugT(double t) const;
216 void dumpBoth(SkTSect<OppCurve, TCurve>* ) const;
231 SkTSpan<TCurve, OppCurve>* addFollowing(SkTSpan<TCurve, OppCurve>* prior);
232 void addForPerp(SkTSpan<OppCurve, TCurve>* span, double t);
233 SkTSpan<TCurve, OppCurve>* addOne();
235 SkTSpan<TCurve, OppCurve>* addSplitAt(SkTSpan<TCurve, OppCurve>* span, double t) { in addSplitAt() argument
236 SkTSpan<TCurve, OppCurve>* result = this->addOne(); in addSplitAt()
243 bool binarySearchCoin(SkTSect<OppCurve, TCurve>* , double tStart, double tStep, double* t,
245 SkTSpan<TCurve, OppCurve>* boundsMax() const;
246 void coincidentCheck(SkTSect<OppCurve, TCurve>* sect2);
249 void computePerpendiculars(SkTSect<OppCurve, TCurve>* sect2, SkTSpan<TCurve, OppCurve>* first,
250 SkTSpan<TCurve, OppCurve>* last);
251 int countConsecutiveSpans(SkTSpan<TCurve, OppCurve>* first,
252 SkTSpan<TCurve, OppCurve>** last) const;
259 void dumpCommon(const SkTSpan<TCurve, OppCurve>* ) const;
260 void dumpCommonCurves(const SkTSpan<TCurve, OppCurve>* ) const;
261 static int EndsEqual(const SkTSect* sect1, const SkTSect<OppCurve, TCurve>* sect2,
263 SkTSpan<TCurve, OppCurve>* extractCoincident(SkTSect<OppCurve, TCurve>* sect2,
264 SkTSpan<TCurve, OppCurve>* first,
265 SkTSpan<TCurve, OppCurve>* last);
266 SkTSpan<TCurve, OppCurve>* findCoincidentRun(SkTSpan<TCurve, OppCurve>* first,
267 SkTSpan<TCurve, OppCurve>** lastPtr);
268 int intersects(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp,
269 SkTSpan<OppCurve, TCurve>* oppSpan, int* oppResult);
270 int linesIntersect(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp,
271 SkTSpan<OppCurve, TCurve>* oppSpan, SkIntersections* );
272 void markSpanGone(SkTSpan<TCurve, OppCurve>* span);
273 bool matchedDirection(double t, const SkTSect<OppCurve, TCurve>* sect2, double t2) const;
274 void matchedDirCheck(double t, const SkTSect<OppCurve, TCurve>* sect2, double t2,
276 void mergeCoincidence(SkTSect<OppCurve, TCurve>* sect2);
277 SkTSpan<TCurve, OppCurve>* prev(SkTSpan<TCurve, OppCurve>* ) const;
278 void removeByPerpendicular(SkTSect<OppCurve, TCurve>* opp);
280 void removeCoincident(SkTSpan<TCurve, OppCurve>* span, bool isBetween);
281 void removeAllBut(const SkTSpan<OppCurve, TCurve>* keep, SkTSpan<TCurve, OppCurve>* span,
282 SkTSect<OppCurve, TCurve>* opp);
283 void removeSpan(SkTSpan<TCurve, OppCurve>* span);
284 void removeSpanRange(SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last);
285 void removeSpans(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp);
286 SkTSpan<TCurve, OppCurve>* spanAtT(double t, SkTSpan<TCurve, OppCurve>** priorSpan);
287 SkTSpan<TCurve, OppCurve>* tail();
288 void trim(SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp);
289 void unlinkSpan(SkTSpan<TCurve, OppCurve>* span);
290 bool updateBounded(SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last,
291 SkTSpan<OppCurve, TCurve>* oppFirst);
295 const TCurve& fCurve;
297 SkTSpan<TCurve, OppCurve>* fHead;
298 SkTSpan<TCurve, OppCurve>* fCoincident;
299 SkTSpan<TCurve, OppCurve>* fDeleted;
301 SkDEBUGCODE_(SkTSect<OppCurve, TCurve>* fOppSect);
307 friend class SkTSpan<TCurve, OppCurve>;
308 friend class SkTSpan<OppCurve, TCurve>;
309 friend class SkTSect<OppCurve, TCurve>;
314 template<typename TCurve, typename OppCurve>
315 void SkTCoincident<TCurve, OppCurve>::setPerp(const TCurve& c1, double t, in setPerp()
350 template<typename TCurve, typename OppCurve>
351 void SkTSpan<TCurve, OppCurve>::addBounded(SkTSpan<OppCurve, TCurve>* span, SkChunkAlloc* heap) { in addBounded()
352 SkTSpanBounded<OppCurve, TCurve>* bounded = SkNEW_PLACEMENT(heap->allocThrow( in addBounded()
353 sizeof(SkTSpanBounded<OppCurve, TCurve>)), (SkTSpanBounded<OppCurve, TCurve>)); in addBounded()
359 template<typename TCurve, typename OppCurve>
360 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::addFollowing( in addFollowing() argument
361 SkTSpan<TCurve, OppCurve>* prior) { in addFollowing()
362 SkTSpan<TCurve, OppCurve>* result = this->addOne(); in addFollowing()
364 SkTSpan<TCurve, OppCurve>* next = prior ? prior->fNext : fHead; in addFollowing()
380 template<typename TCurve, typename OppCurve>
381 void SkTSect<TCurve, OppCurve>::addForPerp(SkTSpan<OppCurve, TCurve>* span, double t) { in addForPerp()
383 SkTSpan<TCurve, OppCurve>* priorSpan; in addForPerp()
384 SkTSpan<TCurve, OppCurve>* opp = this->spanAtT(t, &priorSpan); in addForPerp()
406 template<typename TCurve, typename OppCurve>
407 double SkTSpan<TCurve, OppCurve>::closestBoundedT(const SkDPoint& pt) const { in closestBoundedT()
410 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; in closestBoundedT()
412 const SkTSpan<OppCurve, TCurve>* test = testBounded->fBounded; in closestBoundedT()
430 template<typename TCurve, typename OppCurve>
431 bool SkTSpan<TCurve, OppCurve>::debugIsBefore(const SkTSpan* span) const { in debugIsBefore()
442 template<typename TCurve, typename OppCurve>
443 bool SkTSpan<TCurve, OppCurve>::contains(double t) const { in contains()
453 template<typename TCurve, typename OppCurve>
454 const SkTSect<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::debugOpp() const { in debugOpp()
458 template<typename TCurve, typename OppCurve>
459 SkTSpan<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::findOppSpan( in findOppSpan()
460 const SkTSpan<OppCurve, TCurve>* opp) const { in findOppSpan()
461 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in findOppSpan()
463 SkTSpan<OppCurve, TCurve>* test = bounded->fBounded; in findOppSpan()
476 template<typename TCurve, typename OppCurve>
477 int SkTSpan<TCurve, OppCurve>::hullCheck(const SkTSpan<OppCurve, TCurve>* opp, in hullCheck()
504 template<typename TCurve, typename OppCurve>
505 int SkTSpan<TCurve, OppCurve>::hullsIntersect(SkTSpan<OppCurve, TCurve>* opp, in hullsIntersect()
521 template<typename TCurve, typename OppCurve>
522 void SkTSpan<TCurve, OppCurve>::init(const TCurve& c) { in init()
530 template<typename TCurve, typename OppCurve>
531 void SkTSpan<TCurve, OppCurve>::initBounds(const TCurve& c) { in initBounds()
547 template<typename TCurve, typename OppCurve>
548 bool SkTSpan<TCurve, OppCurve>::linearsIntersect(SkTSpan<OppCurve, TCurve>* span) { in linearsIntersect()
559 template<typename TCurve, typename OppCurve>
560 double SkTSpan<TCurve, OppCurve>::linearT(const SkDPoint& pt) const { in linearT()
561 SkDVector len = fPart[TCurve::kPointLast] - fPart[0]; in linearT()
567 template<typename TCurve, typename OppCurve>
568 int SkTSpan<TCurve, OppCurve>::linearIntersects(const OppCurve& q2) const { in linearIntersects()
570 int start = 0, end = TCurve::kPointLast; // the outside points are usually the extremes in linearIntersects()
573 for (int outer = 0; outer < TCurve::kPointCount - 1; ++outer) { in linearIntersects()
574 for (int inner = outer + 1; inner < TCurve::kPointCount; ++inner) { in linearIntersects()
614 template<typename TCurve, typename OppCurve>
615 bool SkTSpan<TCurve, OppCurve>::onlyEndPointsInCommon(const SkTSpan<OppCurve, TCurve>* opp, in onlyEndPointsInCommon()
619 } else if (opp->fPart[0] == fPart[TCurve::kPointLast]) { in onlyEndPointsInCommon()
625 } else if (opp->fPart[OppCurve::kPointLast] == fPart[TCurve::kPointLast]) { in onlyEndPointsInCommon()
632 const SkDPoint* otherPts[TCurve::kPointCount - 1], * oppOtherPts[OppCurve::kPointCount - 1]; in onlyEndPointsInCommon()
633 int baseIndex = *start ? 0 : TCurve::kPointLast; in onlyEndPointsInCommon()
649 template<typename TCurve, typename OppCurve>
650 SkTSpan<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::oppT(double t) const { in oppT()
651 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in oppT()
653 SkTSpan<OppCurve, TCurve>* test = bounded->fBounded; in oppT()
662 template<typename TCurve, typename OppCurve>
663 bool SkTSpan<TCurve, OppCurve>::removeAllBounded() { in removeAllBounded()
665 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in removeAllBounded()
667 SkTSpan<OppCurve, TCurve>* opp = bounded->fBounded; in removeAllBounded()
674 template<typename TCurve, typename OppCurve>
675 bool SkTSpan<TCurve, OppCurve>::removeBounded(const SkTSpan<OppCurve, TCurve>* opp) { in removeBounded()
679 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in removeBounded()
681 SkTSpan<OppCurve, TCurve>* test = bounded->fBounded; in removeBounded()
694 SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded; in removeBounded()
695 SkTSpanBounded<OppCurve, TCurve>* prev = NULL; in removeBounded()
697 SkTSpanBounded<OppCurve, TCurve>* boundedNext = bounded->fNext; in removeBounded()
714 template<typename TCurve, typename OppCurve>
715 bool SkTSpan<TCurve, OppCurve>::splitAt(SkTSpan* work, double t, SkChunkAlloc* heap) { in splitAt()
736 SkTSpanBounded<OppCurve, TCurve>* bounded = work->fBounded; in splitAt()
750 template<typename TCurve, typename OppCurve>
751 void SkTSpan<TCurve, OppCurve>::validate() const { in validate()
776 template<typename TCurve, typename OppCurve>
777 void SkTSpan<TCurve, OppCurve>::validateBounded() const { in validateBounded()
779 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; in validateBounded()
781 SkDEBUGCODE_(const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBounded); in validateBounded()
790 template<typename TCurve, typename OppCurve>
791 void SkTSpan<TCurve, OppCurve>::validatePerpT(double oppT) const { in validatePerpT()
792 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; in validatePerpT()
794 const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBounded; in validatePerpT()
803 template<typename TCurve, typename OppCurve>
804 void SkTSpan<TCurve, OppCurve>::validatePerpPt(double t, const SkDPoint& pt) const { in validatePerpPt()
809 template<typename TCurve, typename OppCurve>
810 SkTSect<TCurve, OppCurve>::SkTSect(const TCurve& c PATH_OPS_DEBUG_T_SECT_PARAMS(int id)) in SkTSect()
812 , fHeap(sizeof(SkTSpan<TCurve, OppCurve>) * 4) in SkTSect()
824 template<typename TCurve, typename OppCurve>
825 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::addOne() { in addOne()
826 SkTSpan<TCurve, OppCurve>* result; in addOne()
832 result = SkNEW_PLACEMENT(fHeap.allocThrow(sizeof(SkTSpan<TCurve, OppCurve>)), in addOne()
833 (SkTSpan<TCurve, OppCurve>)); in addOne()
847 template<typename TCurve, typename OppCurve>
848 bool SkTSect<TCurve, OppCurve>::binarySearchCoin(SkTSect<OppCurve, TCurve>* sect2, double tStart, in binarySearchCoin()
850 SkTSpan<TCurve, OppCurve> work; in binarySearchCoin()
892 } else if (last.approximatelyEqual(fCurve[TCurve::kPointLast])) { in binarySearchCoin()
907 template<typename TCurve, typename OppCurve>
908 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::boundsMax() const { in boundsMax()
909 SkTSpan<TCurve, OppCurve>* test = fHead; in boundsMax()
910 SkTSpan<TCurve, OppCurve>* largest = fHead; in boundsMax()
923 template<typename TCurve, typename OppCurve>
924 void SkTSect<TCurve, OppCurve>::coincidentCheck(SkTSect<OppCurve, TCurve>* sect2) { in coincidentCheck()
925 SkTSpan<TCurve, OppCurve>* first = fHead; in coincidentCheck()
926 SkTSpan<TCurve, OppCurve>* last, * next; in coincidentCheck()
939 SkTSpan<TCurve, OppCurve>* coinStart = first; in coincidentCheck()
946 template<typename TCurve, typename OppCurve>
947 bool SkTSect<TCurve, OppCurve>::coincidentHasT(double t) { in coincidentHasT()
948 SkTSpan<TCurve, OppCurve>* test = fCoincident; in coincidentHasT()
958 template<typename TCurve, typename OppCurve>
959 int SkTSect<TCurve, OppCurve>::collapsed() const { in collapsed()
961 const SkTSpan<TCurve, OppCurve>* test = fHead; in collapsed()
971 template<typename TCurve, typename OppCurve>
972 void SkTSect<TCurve, OppCurve>::computePerpendiculars(SkTSect<OppCurve, TCurve>* sect2, in computePerpendiculars()
973 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) { in computePerpendiculars() argument
975 SkTSpan<TCurve, OppCurve>* work = first; in computePerpendiculars()
976 SkTSpan<TCurve, OppCurve>* prior = NULL; in computePerpendiculars()
992 work->fCoinEnd.setPerp(fCurve, work->fEndT, work->fPart[TCurve::kPointLast], opp); in computePerpendiculars()
1012 template<typename TCurve, typename OppCurve>
1013 int SkTSect<TCurve, OppCurve>::countConsecutiveSpans(SkTSpan<TCurve, OppCurve>* first, in countConsecutiveSpans() argument
1014 SkTSpan<TCurve, OppCurve>** lastPtr) const { in countConsecutiveSpans()
1016 SkTSpan<TCurve, OppCurve>* last = first; in countConsecutiveSpans()
1018 SkTSpan<TCurve, OppCurve>* next = last->fNext; in countConsecutiveSpans()
1032 template<typename TCurve, typename OppCurve>
1033 bool SkTSect<TCurve, OppCurve>::debugHasBounded(const SkTSpan<OppCurve, TCurve>* span) const { in debugHasBounded()
1034 const SkTSpan<TCurve, OppCurve>* test = fHead; in debugHasBounded()
1046 template<typename TCurve, typename OppCurve>
1047 void SkTSect<TCurve, OppCurve>::deleteEmptySpans() { in deleteEmptySpans()
1048 SkTSpan<TCurve, OppCurve>* test; in deleteEmptySpans()
1049 SkTSpan<TCurve, OppCurve>* next = fHead; in deleteEmptySpans()
1058 template<typename TCurve, typename OppCurve>
1059 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::extractCoincident( in extractCoincident() argument
1060 SkTSect<OppCurve, TCurve>* sect2, in extractCoincident()
1061 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) { in extractCoincident()
1070 SkTSpan<TCurve, OppCurve>* prev = first->fPrev; in extractCoincident()
1072 SkTSpan<OppCurve, TCurve>* oppFirst = first->findOppT(first->fCoinStart.perpT()); in extractCoincident()
1077 SkTSpan<OppCurve, TCurve>* cutFirst; in extractCoincident()
1088 SkTSpan<OppCurve, TCurve>* oppHalf = sect2->addSplitAt(oppFirst, oppStartT); in extractCoincident()
1103 SkTSpan<OppCurve, TCurve>* oppLast; in extractCoincident()
1127 first->fCoinEnd.setPerp(fCurve, first->fEndT, first->fPart[TCurve::kPointLast], sect2->fCurve); in extractCoincident()
1152 template<typename TCurve, typename OppCurve>
1153 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::findCoincidentRun( in findCoincidentRun() argument
1154 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>** lastPtr) { in findCoincidentRun()
1155 SkTSpan<TCurve, OppCurve>* work = first; in findCoincidentRun()
1156 SkTSpan<TCurve, OppCurve>* lastCandidate = NULL; in findCoincidentRun()
1192 template<typename TCurve, typename OppCurve>
1193 int SkTSect<TCurve, OppCurve>::intersects(SkTSpan<TCurve, OppCurve>* span, in intersects() argument
1194 SkTSect<OppCurve, TCurve>* opp, in intersects()
1195 SkTSpan<OppCurve, TCurve>* oppSpan, int* oppResult) { in intersects()
1245 template<typename TCurve, typename OppCurve>
1246 int SkTSect<TCurve, OppCurve>::linesIntersect(SkTSpan<TCurve, OppCurve>* span, in linesIntersect() argument
1247 SkTSect<OppCurve, TCurve>* opp, in linesIntersect()
1248 SkTSpan<OppCurve, TCurve>* oppSpan, SkIntersections* i) { in linesIntersect()
1250 SkDLine thisLine = {{ span->fPart[0], span->fPart[TCurve::kPointLast] }}; in linesIntersect()
1311 SkTCoincident<OppCurve, TCurve> oCoinS, oCoinE; in linesIntersect()
1327 SkTCoincident<TCurve, OppCurve> coinS; in linesIntersect()
1336 SkTCoincident<TCurve, OppCurve> coinE; in linesIntersect()
1337 coinE.setPerp(fCurve, span->fEndT, span->fPart[TCurve::kPointLast], opp->fCurve); in linesIntersect()
1338 perpE = span->fPart[TCurve::kPointLast] - coinE.perpPt(); in linesIntersect()
1347 SkTCoincident<TCurve, OppCurve> coinW; in linesIntersect()
1374 template<typename TCurve, typename OppCurve>
1375 void SkTSect<TCurve, OppCurve>::markSpanGone(SkTSpan<TCurve, OppCurve>* span) { in markSpanGone() argument
1383 template<typename TCurve, typename OppCurve>
1384 bool SkTSect<TCurve, OppCurve>::matchedDirection(double t, const SkTSect<OppCurve, TCurve>* sect2, in matchedDirection()
1391 template<typename TCurve, typename OppCurve>
1392 void SkTSect<TCurve, OppCurve>::matchedDirCheck(double t, const SkTSect<OppCurve, TCurve>* sect2, in matchedDirCheck()
1402 template<typename TCurve, typename OppCurve>
1403 void SkTSect<TCurve, OppCurve>::mergeCoincidence(SkTSect<OppCurve, TCurve>* sect2) { in mergeCoincidence()
1407 SkTSpan<TCurve, OppCurve>* smaller = NULL; in mergeCoincidence()
1408 SkTSpan<TCurve, OppCurve>* test = fCoincident; in mergeCoincidence()
1423 SkTSpan<TCurve, OppCurve>* prior = NULL; in mergeCoincidence()
1424 SkTSpan<TCurve, OppCurve>* larger = NULL; in mergeCoincidence()
1425 SkTSpan<TCurve, OppCurve>* largerPrior = NULL; in mergeCoincidence()
1444 SkTCoincident<TCurve, OppCurve> coin; in mergeCoincidence()
1458 template<typename TCurve, typename OppCurve>
1459 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::prev( in prev() argument
1460 SkTSpan<TCurve, OppCurve>* span) const { in prev()
1461 SkTSpan<TCurve, OppCurve>* result = NULL; in prev()
1462 SkTSpan<TCurve, OppCurve>* test = fHead; in prev()
1471 template<typename TCurve, typename OppCurve>
1472 void SkTSect<TCurve, OppCurve>::recoverCollapsed() { in recoverCollapsed()
1473 SkTSpan<TCurve, OppCurve>* deleted = fDeleted; in recoverCollapsed()
1475 SkTSpan<TCurve, OppCurve>* delNext = deleted->fNext; in recoverCollapsed()
1477 SkTSpan<TCurve, OppCurve>** spanPtr = &fHead; in recoverCollapsed()
1488 template<typename TCurve, typename OppCurve>
1489 void SkTSect<TCurve, OppCurve>::removeAllBut(const SkTSpan<OppCurve, TCurve>* keep, in removeAllBut()
1490 SkTSpan<TCurve, OppCurve>* span, SkTSect<OppCurve, TCurve>* opp) { in removeAllBut() argument
1491 const SkTSpanBounded<OppCurve, TCurve>* testBounded = span->fBounded; in removeAllBut()
1493 SkTSpan<OppCurve, TCurve>* bounded = testBounded->fBounded; in removeAllBut()
1494 const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; in removeAllBut()
1509 template<typename TCurve, typename OppCurve>
1510 void SkTSect<TCurve, OppCurve>::removeByPerpendicular(SkTSect<OppCurve, TCurve>* opp) { in removeByPerpendicular()
1511 SkTSpan<TCurve, OppCurve>* test = fHead; in removeByPerpendicular()
1512 SkTSpan<TCurve, OppCurve>* next; in removeByPerpendicular()
1519 SkDVector endV = test->fCoinEnd.perpPt() - test->fPart[TCurve::kPointLast]; in removeByPerpendicular()
1531 template<typename TCurve, typename OppCurve>
1532 void SkTSect<TCurve, OppCurve>::removeCoincident(SkTSpan<TCurve, OppCurve>* span, bool isBetween) { in removeCoincident() argument
1543 template<typename TCurve, typename OppCurve>
1544 void SkTSect<TCurve, OppCurve>::removeSpan(SkTSpan<TCurve, OppCurve>* span) { in removeSpan() argument
1549 template<typename TCurve, typename OppCurve>
1550 void SkTSect<TCurve, OppCurve>::removeSpanRange(SkTSpan<TCurve, OppCurve>* first, in removeSpanRange() argument
1551 SkTSpan<TCurve, OppCurve>* last) { in removeSpanRange()
1555 SkTSpan<TCurve, OppCurve>* span = first; in removeSpanRange()
1557 SkTSpan<TCurve, OppCurve>* final = last->fNext; in removeSpanRange()
1558 SkTSpan<TCurve, OppCurve>* next = span->fNext; in removeSpanRange()
1569 template<typename TCurve, typename OppCurve>
1570 void SkTSect<TCurve, OppCurve>::removeSpans(SkTSpan<TCurve, OppCurve>* span, in removeSpans() argument
1571 SkTSect<OppCurve, TCurve>* opp) { in removeSpans()
1572 SkTSpanBounded<OppCurve, TCurve>* bounded = span->fBounded; in removeSpans()
1574 SkTSpan<OppCurve, TCurve>* spanBounded = bounded->fBounded; in removeSpans()
1575 SkTSpanBounded<OppCurve, TCurve>* next = bounded->fNext; in removeSpans()
1587 template<typename TCurve, typename OppCurve>
1588 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::spanAtT(double t, in spanAtT() argument
1589 SkTSpan<TCurve, OppCurve>** priorSpan) { in spanAtT()
1590 SkTSpan<TCurve, OppCurve>* test = fHead; in spanAtT()
1591 SkTSpan<TCurve, OppCurve>* prev = NULL; in spanAtT()
1600 template<typename TCurve, typename OppCurve>
1601 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::tail() { in tail()
1602 SkTSpan<TCurve, OppCurve>* result = fHead; in tail()
1603 SkTSpan<TCurve, OppCurve>* next = fHead; in tail()
1614 template<typename TCurve, typename OppCurve>
1615 void SkTSect<TCurve, OppCurve>::trim(SkTSpan<TCurve, OppCurve>* span, in trim() argument
1616 SkTSect<OppCurve, TCurve>* opp) { in trim()
1618 const SkTSpanBounded<OppCurve, TCurve>* testBounded = span->fBounded; in trim()
1620 SkTSpan<OppCurve, TCurve>* test = testBounded->fBounded; in trim()
1621 const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; in trim()
1645 template<typename TCurve, typename OppCurve>
1646 void SkTSect<TCurve, OppCurve>::unlinkSpan(SkTSpan<TCurve, OppCurve>* span) { in unlinkSpan() argument
1647 SkTSpan<TCurve, OppCurve>* prev = span->fPrev; in unlinkSpan()
1648 SkTSpan<TCurve, OppCurve>* next = span->fNext; in unlinkSpan()
1662 template<typename TCurve, typename OppCurve>
1663 bool SkTSect<TCurve, OppCurve>::updateBounded(SkTSpan<TCurve, OppCurve>* first, in updateBounded() argument
1664 SkTSpan<TCurve, OppCurve>* last, SkTSpan<OppCurve, TCurve>* oppFirst) { in updateBounded()
1665 SkTSpan<TCurve, OppCurve>* test = first; in updateBounded()
1666 const SkTSpan<TCurve, OppCurve>* final = last->next(); in updateBounded()
1678 template<typename TCurve, typename OppCurve>
1679 void SkTSect<TCurve, OppCurve>::validate() const { in validate()
1683 const SkTSpan<TCurve, OppCurve>* span = fHead; in validate()
1696 const SkTSpan<TCurve, OppCurve>* deleted = fDeleted; in validate()
1701 const SkTSpan<TCurve, OppCurve>* coincident = fCoincident; in validate()
1710 template<typename TCurve, typename OppCurve>
1711 void SkTSect<TCurve, OppCurve>::validateBounded() const { in validateBounded()
1716 const SkTSpan<TCurve, OppCurve>* span = fHead; in validateBounded()
1723 template<typename TCurve, typename OppCurve>
1724 int SkTSect<TCurve, OppCurve>::EndsEqual(const SkTSect<TCurve, OppCurve>* sect1, in EndsEqual() argument
1725 const SkTSect<OppCurve, TCurve>* sect2, SkIntersections* intersections) { in EndsEqual()
1735 if (sect1->fCurve[TCurve::kPointLast] == sect2->fCurve[0]) { in EndsEqual()
1737 intersections->insert(1, 0, sect1->fCurve[TCurve::kPointLast]); in EndsEqual()
1739 if (sect1->fCurve[TCurve::kPointLast] == sect2->fCurve[OppCurve::kPointLast]) { in EndsEqual()
1741 intersections->insert(1, 1, sect1->fCurve[TCurve::kPointLast]); in EndsEqual()
1756 && sect1->fCurve[TCurve::kPointLast].approximatelyEqual(sect2->fCurve[0])) { in EndsEqual()
1758 intersections->insertNear(1, 0, sect1->fCurve[TCurve::kPointLast], sect2->fCurve[0]); in EndsEqual()
1761 && sect1->fCurve[TCurve::kPointLast].approximatelyEqual(sect2->fCurve[ in EndsEqual()
1764 intersections->insertNear(1, 1, sect1->fCurve[TCurve::kPointLast], in EndsEqual()
1770 template<typename TCurve, typename OppCurve>
1782 void findEnd(const SkTSpan<TCurve, OppCurve>* span1, const SkTSpan<OppCurve, TCurve>* span2, in findEnd()
1784 const TCurve& c1 = span1->part(); in findEnd()
1838 const SkTSpan<TCurve, OppCurve>* fC1Span;
1839 const SkTSpan<OppCurve, TCurve>* fC2Span;
1849 template<typename TCurve, typename OppCurve>
1856 bool find(const SkTSpan<TCurve, OppCurve>* span1, const SkTSpan<OppCurve, TCurve>* span2) { in find()
1857 SkClosestRecord<TCurve, OppCurve>* record = &fClosest[fUsed]; in find()
1860 record->findEnd(span1, span2, TCurve::kPointLast, 0); in find()
1861 record->findEnd(span1, span2, TCurve::kPointLast, OppCurve::kPointLast); in find()
1866 SkClosestRecord<TCurve, OppCurve>* test = &fClosest[index]; in find()
1882 SkSTArray<TCurve::kMaxIntersections * 3, in finish()
1883 const SkClosestRecord<TCurve, OppCurve>*, true> closestPtrs; in finish()
1887 SkTQSort<const SkClosestRecord<TCurve, OppCurve> >(closestPtrs.begin(), closestPtrs.end() in finish()
1890 const SkClosestRecord<TCurve, OppCurve>* test = closestPtrs[index]; in finish()
1896 SkSTArray<TCurve::kMaxIntersections * 2, SkClosestRecord<TCurve, OppCurve>, true> fClosest;
1901 template<typename TCurve, typename OppCurve>
1902 void SkTSect<TCurve, OppCurve>::BinarySearch(SkTSect<TCurve, OppCurve>* sect1, in BinarySearch() argument
1903 SkTSect<OppCurve, TCurve>* sect2, SkIntersections* intersections) { in BinarySearch()
1910 intersections->setMax(TCurve::kMaxIntersections * 3); // give extra for slop in BinarySearch()
1911 SkTSpan<TCurve, OppCurve>* span1 = sect1->fHead; in BinarySearch()
1912 SkTSpan<OppCurve, TCurve>* span2 = sect2->fHead; in BinarySearch()
1926 SkTSpan<TCurve, OppCurve>* largest1 = sect1->boundsMax(); in BinarySearch()
1930 SkTSpan<OppCurve, TCurve>* largest2 = sect2->boundsMax(); in BinarySearch()
1938 SkTSpan<TCurve, OppCurve>* half1 = sect1->addOne(); in BinarySearch()
1949 SkTSpan<OppCurve, TCurve>* half2 = sect2->addOne(); in BinarySearch()
1972 if (sect1->collapsed() > TCurve::kMaxIntersections) { in BinarySearch()
1983 SkTSpan<TCurve, OppCurve>* coincident = sect1->fCoincident; in BinarySearch()
1998 coincident->fPart[TCurve::kPointLast]) < 0) && index >= 0) { in BinarySearch()
2009 SkTSpan<TCurve, OppCurve>* result1 = sect1->fHead; in BinarySearch()
2011 const SkTSpan<TCurve, OppCurve>* head1 = result1; in BinarySearch()
2021 const SkTSpan<OppCurve, TCurve>* head2 = sect2->fHead; in BinarySearch()
2031 const SkTSpan<TCurve, OppCurve>* tail1 = sect1->tail(); in BinarySearch()
2033 const SkDPoint& end1 = sect1->fCurve[TCurve::kPointLast]; in BinarySearch()
2041 const SkTSpan<OppCurve, TCurve>* tail2 = sect2->tail(); in BinarySearch()
2051 SkClosestSect<TCurve, OppCurve> closest; in BinarySearch()
2059 SkTSpan<OppCurve, TCurve>* result2 = sect2->fHead; in BinarySearch()
2077 SkTCoincident<TCurve, OppCurve> perp; in BinarySearch()
2094 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); in BinarySearch()