| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkAddIntersections.h" | 7 #include "SkAddIntersections.h" |
| 8 #include "SkOpCoincidence.h" | 8 #include "SkOpCoincidence.h" |
| 9 #include "SkOpEdgeBuilder.h" | 9 #include "SkOpEdgeBuilder.h" |
| 10 #include "SkPathOpsCommon.h" | 10 #include "SkPathOpsCommon.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 if (!angle) { | 39 if (!angle) { |
| 40 return nullptr; | 40 return nullptr; |
| 41 } | 41 } |
| 42 if (winding == SK_MinS32) { | 42 if (winding == SK_MinS32) { |
| 43 continue; | 43 continue; |
| 44 } | 44 } |
| 45 int sumMiWinding, sumSuWinding; | 45 int sumMiWinding, sumSuWinding; |
| 46 if (sortable) { | 46 if (sortable) { |
| 47 segment = angle->segment(); | 47 segment = angle->segment(); |
| 48 sumMiWinding = segment->updateWindingReverse(angle); | 48 sumMiWinding = segment->updateWindingReverse(angle); |
| 49 if (sumMiWinding == SK_MinS32) { |
| 50 SkASSERT(segment->globalState()->debugSkipAssert()); |
| 51 return nullptr; |
| 52 } |
| 49 sumSuWinding = segment->updateOppWindingReverse(angle); | 53 sumSuWinding = segment->updateOppWindingReverse(angle); |
| 54 if (sumSuWinding == SK_MinS32) { |
| 55 SkASSERT(segment->globalState()->debugSkipAssert()); |
| 56 return nullptr; |
| 57 } |
| 50 if (segment->operand()) { | 58 if (segment->operand()) { |
| 51 SkTSwap<int>(sumMiWinding, sumSuWinding); | 59 SkTSwap<int>(sumMiWinding, sumSuWinding); |
| 52 } | 60 } |
| 53 } | 61 } |
| 54 SkOpSegment* first = nullptr; | 62 SkOpSegment* first = nullptr; |
| 55 const SkOpAngle* firstAngle = angle; | 63 const SkOpAngle* firstAngle = angle; |
| 56 while ((angle = angle->next()) != firstAngle) { | 64 while ((angle = angle->next()) != firstAngle) { |
| 57 segment = angle->segment(); | 65 segment = angle->segment(); |
| 58 SkOpSpanBase* start = angle->start(); | 66 SkOpSpanBase* start = angle->start(); |
| 59 SkOpSpanBase* end = angle->end(); | 67 SkOpSpanBase* end = angle->end(); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 one.dumpHex(); | 463 one.dumpHex(); |
| 456 SkDebugf("two: fill=%d\n", two.getFillType()); | 464 SkDebugf("two: fill=%d\n", two.getFillType()); |
| 457 two.dumpHex(); | 465 two.dumpHex(); |
| 458 SkASSERT(0); | 466 SkASSERT(0); |
| 459 } | 467 } |
| 460 return true; | 468 return true; |
| 461 #else | 469 #else |
| 462 return OpDebug(one, two, op, result SkDEBUGPARAMS(true) SkDEBUGPARAMS(nullp
tr)); | 470 return OpDebug(one, two, op, result SkDEBUGPARAMS(true) SkDEBUGPARAMS(nullp
tr)); |
| 463 #endif | 471 #endif |
| 464 } | 472 } |
| OLD | NEW |