OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "SkOpCoincidence.h" | 7 #include "SkOpCoincidence.h" |
8 #include "SkOpContour.h" | 8 #include "SkOpContour.h" |
9 #include "SkOpSegment.h" | 9 #include "SkOpSegment.h" |
10 #include "SkPathWriter.h" | 10 #include "SkPathWriter.h" |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 SkASSERT(t != 1); | 354 SkASSERT(t != 1); |
355 initBase(segment, prev, t, pt); | 355 initBase(segment, prev, t, pt); |
356 fCoincident = this; | 356 fCoincident = this; |
357 fToAngle = nullptr; | 357 fToAngle = nullptr; |
358 fWindSum = fOppSum = SK_MinS32; | 358 fWindSum = fOppSum = SK_MinS32; |
359 fWindValue = 1; | 359 fWindValue = 1; |
360 fOppValue = 0; | 360 fOppValue = 0; |
361 fTopTTry = 0; | 361 fTopTTry = 0; |
362 fChased = fDone = false; | 362 fChased = fDone = false; |
363 segment->bumpCount(); | 363 segment->bumpCount(); |
| 364 fAlreadyAdded = false; |
364 } | 365 } |
365 | 366 |
366 void SkOpSpan::setOppSum(int oppSum) { | 367 void SkOpSpan::setOppSum(int oppSum) { |
367 SkASSERT(!final()); | 368 SkASSERT(!final()); |
368 if (fOppSum != SK_MinS32 && fOppSum != oppSum) { | 369 if (fOppSum != SK_MinS32 && fOppSum != oppSum) { |
369 this->globalState()->setWindingFailed(); | 370 this->globalState()->setWindingFailed(); |
370 return; | 371 return; |
371 } | 372 } |
372 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(oppSum) <= DEBUG_LIMIT_WIND_SUM); | 373 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(oppSum) <= DEBUG_LIMIT_WIND_SUM); |
373 fOppSum = oppSum; | 374 fOppSum = oppSum; |
374 } | 375 } |
375 | 376 |
376 void SkOpSpan::setWindSum(int windSum) { | 377 void SkOpSpan::setWindSum(int windSum) { |
377 SkASSERT(!final()); | 378 SkASSERT(!final()); |
378 if (fWindSum != SK_MinS32 && fWindSum != windSum) { | 379 if (fWindSum != SK_MinS32 && fWindSum != windSum) { |
379 this->globalState()->setWindingFailed(); | 380 this->globalState()->setWindingFailed(); |
380 return; | 381 return; |
381 } | 382 } |
382 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); | 383 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); |
383 fWindSum = windSum; | 384 fWindSum = windSum; |
384 } | 385 } |
OLD | NEW |