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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 fChased = fDone = false; | 362 fChased = fDone = false; |
363 segment->bumpCount(); | 363 segment->bumpCount(); |
364 } | 364 } |
365 | 365 |
366 void SkOpSpan::setOppSum(int oppSum) { | 366 void SkOpSpan::setOppSum(int oppSum) { |
367 SkASSERT(!final()); | 367 SkASSERT(!final()); |
368 if (fOppSum != SK_MinS32 && fOppSum != oppSum) { | 368 if (fOppSum != SK_MinS32 && fOppSum != oppSum) { |
369 this->globalState()->setWindingFailed(); | 369 this->globalState()->setWindingFailed(); |
370 return; | 370 return; |
371 } | 371 } |
372 SkASSERT(!DEBUG_LIMIT_WIND_SUM || abs(oppSum) <= DEBUG_LIMIT_WIND_SUM); | 372 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(oppSum) <= DEBUG_LIMIT_WIND_SUM); |
373 fOppSum = oppSum; | 373 fOppSum = oppSum; |
374 } | 374 } |
375 | 375 |
376 void SkOpSpan::setWindSum(int windSum) { | 376 void SkOpSpan::setWindSum(int windSum) { |
377 SkASSERT(!final()); | 377 SkASSERT(!final()); |
378 if (fWindSum != SK_MinS32 && fWindSum != windSum) { | 378 if (fWindSum != SK_MinS32 && fWindSum != windSum) { |
379 this->globalState()->setWindingFailed(); | 379 this->globalState()->setWindingFailed(); |
380 return; | 380 return; |
381 } | 381 } |
382 SkASSERT(!DEBUG_LIMIT_WIND_SUM || abs(windSum) <= DEBUG_LIMIT_WIND_SUM); | 382 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); |
383 fWindSum = windSum; | 383 fWindSum = windSum; |
384 } | 384 } |
OLD | NEW |