Home | History | Annotate | Download | only in pathops

Lines Matching refs:winding

246     // advance the span with zero winding
247 // if the following span exists (not past the end, non-zero winding)
296 // if either is > 0, add a pointer to the other, copying adjacent winding
561 // between the winding values?
699 // each ends up with +2/0 pairs for winding count
739 #else // consolidate the winding count even if done
949 // if all angles have a computed winding,
951 // or if adjacent orderable angles have no computed winding,
953 // if two orderable angles are adjacent, and one has winding computed, transfer to the other
1424 // find start of respective spans and see if both have winding
1530 // if no edge has a computed winding sum, we can go no further
1558 // iterate through the angle, and compute everyone's winding
1680 // iterate through the angle, and compute everyone's winding
1760 // FIXME: I don't know why the logic here is difference from the winding case
2022 If the supplied sign (winding) is zero, then we didn't hit another vertical span, so dx is needed.
2023 If there was a winding, then it may or may not need adjusting. If the span the winding was borrowed
2024 from has the same x direction as this span, the winding should change. If the dx is opposite, then
2025 the same winding is shared by both.
2027 void SkOpSegment::initWinding(int start, int end, double tHit, int winding, SkScalar hitDx,
2029 SkASSERT(hitDx || !winding);
2034 SkDebugf("%s oldWinding=%d hitDx=%c dx=%c windVal=%d", __FUNCTION__, winding,
2037 if (!winding) {
2038 winding = dx < 0 ? windVal : -windVal;
2039 } else if (winding * dx < 0) {
2040 int sideWind = winding + (dx < 0 ? windVal : -windVal);
2041 if (abs(winding) < abs(sideWind)) {
2042 winding = sideWind;
2046 SkDebugf(" winding=%d\n", winding);
2059 (void) markAndChaseWinding(start, end, winding, oppWind);
2061 (void) markAndChaseWinding(end, start, winding, oppWind);
2140 // this span is excluded by the winding rule -- chase the ends
2142 // and give them the same winding value
2174 SkOpSpan* SkOpSegment::markAndChaseWinding(const SkOpAngle* angle, const int winding
2179 markWinding(min, winding);
2184 SkASSERT(other->fTs[min].fWindSum == winding);
2187 other->markWinding(min, winding);
2192 SkOpSpan* SkOpSegment::markAndChaseWinding(int index, int endIndex, int winding, int oppWinding) {
2195 markWinding(min, winding, oppWinding);
2200 SkASSERT(other->fTs[min].fWindSum == winding || other->fTs[min].fLoop);
2203 other->markWinding(min, winding, oppWinding);
2208 SkOpSpan* SkOpSegment::markAndChaseWinding(const SkOpAngle* angle, int winding, int oppWinding) {
2211 return markAndChaseWinding(start, end, winding, oppWinding);
2257 void SkOpSegment::markDone(int index, int winding) {
2259 SkASSERT(winding);
2263 markOneDone(__FUNCTION__, lesser, winding);
2266 markOneDone(__FUNCTION__, index, winding);
2292 void SkOpSegment::markOneDone(const char* funName, int tIndex, int winding) {
2293 SkOpSpan* span = markOneWinding(funName, tIndex, winding);
2319 SkOpSpan* SkOpSegment::markOneWinding(const char* funName, int tIndex, int winding) {
2325 debugShowNewWinding(funName, span, winding);
2327 SkASSERT(span.fWindSum == SK_MinS32 || span.fWindSum == winding);
2328 SkASSERT(abs(winding) <= SkPathOpsDebug::gMaxWindSum);
2329 span.fWindSum = winding;
2333 SkOpSpan* SkOpSegment::markOneWinding(const char* funName, int tIndex, int winding,
2340 debugShowNewWinding(funName, span, winding, oppWinding);
2342 SkASSERT(span.fWindSum == SK_MinS32 || span.fWindSum == winding);
2343 SkASSERT(abs(winding) <= SkPathOpsDebug::gMaxWindSum);
2344 span.fWindSum = winding;
2406 // If the prior angle in the sort is unorderable, the winding sum may not be computable.
2423 // If the prior angle in the sort is unorderable, the winding sum may not be computable.
2456 void SkOpSegment::markWinding(int index, int winding) {
2458 SkASSERT(winding);
2462 markOneWinding(__FUNCTION__, lesser, winding);
2465 markOneWinding(__FUNCTION__, index, winding);
2469 void SkOpSegment::markWinding(int index, int winding, int oppWinding) {
2471 SkASSERT(winding || oppWinding);
2475 markOneWinding(__FUNCTION__, lesser, winding, oppWinding);
2478 markOneWinding(__FUNCTION__, index, winding, oppWinding);
2702 // this means that only adjcent orderable segments may transfer winding
2846 int winding = windSum(lesser);
2848 if (winding && UseInnerWinding(winding - spanWinding, winding)
2849 && winding != SK_MaxS32) {
2850 winding -= spanWinding;
2852 return winding;
2863 int winding = windSum(lesser);
2865 if (winding && UseInnerWindingReverse(winding - spanWinding, winding)
2866 && winding != SK_MaxS32) {
2867 winding -= spanWinding;
2869 return winding;
2903 int winding = crossOpp ? oppSum(tIndex) : windSum(tIndex);
2904 SkASSERT(winding != SK_MinS32);
2907 SkDebugf("%s oldWinding=%d windValue=%d", __FUNCTION__, winding, windVal);
2916 SkDebugf(" dx=0 winding=SK_MinS32\n");
2923 if (winding * *dx > 0) { // if same signs, result is negative
2924 winding += *dx > 0 ? -windVal : windVal;
2927 SkDebugf(" dx=%c winding=%d\n", *dx > 0 ? '+' : '-', winding);
2929 return winding;
3060 void SkOpSegment::debugShowNewWinding(const char* fun, const SkOpSpan& span, int winding) {
3071 (&span)[1].fT, winding);
3080 void SkOpSegment::debugShowNewWinding(const char* fun, const SkOpSpan& span, int winding,
3092 (&span)[1].fT, winding, oppWinding);
3239 int winding = segment->updateWinding(firstAngle);
3241 debugShowSort(fun, angles, first, winding, oppWinding, sortable);