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 18 matching lines...) Expand all Loading... |
29 *chase.append() = span; | 29 *chase.append() = span; |
30 #endif | 30 #endif |
31 return last->segment(); | 31 return last->segment(); |
32 } | 32 } |
33 if (done) { | 33 if (done) { |
34 continue; | 34 continue; |
35 } | 35 } |
36 int winding; | 36 int winding; |
37 bool sortable; | 37 bool sortable; |
38 const SkOpAngle* angle = AngleWinding(*startPtr, *endPtr, &winding, &sor
table); | 38 const SkOpAngle* angle = AngleWinding(*startPtr, *endPtr, &winding, &sor
table); |
| 39 if (!angle) { |
| 40 return nullptr; |
| 41 } |
39 if (winding == SK_MinS32) { | 42 if (winding == SK_MinS32) { |
40 continue; | 43 continue; |
41 } | 44 } |
42 int sumMiWinding, sumSuWinding; | 45 int sumMiWinding, sumSuWinding; |
43 if (sortable) { | 46 if (sortable) { |
44 segment = angle->segment(); | 47 segment = angle->segment(); |
45 sumMiWinding = segment->updateWindingReverse(angle); | 48 sumMiWinding = segment->updateWindingReverse(angle); |
46 sumSuWinding = segment->updateOppWindingReverse(angle); | 49 sumSuWinding = segment->updateOppWindingReverse(angle); |
47 if (segment->operand()) { | 50 if (segment->operand()) { |
48 SkTSwap<int>(sumMiWinding, sumSuWinding); | 51 SkTSwap<int>(sumMiWinding, sumSuWinding); |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 one.dumpHex(); | 454 one.dumpHex(); |
452 SkDebugf("two: fill=%d\n", two.getFillType()); | 455 SkDebugf("two: fill=%d\n", two.getFillType()); |
453 two.dumpHex(); | 456 two.dumpHex(); |
454 SkASSERT(0); | 457 SkASSERT(0); |
455 } | 458 } |
456 return true; | 459 return true; |
457 #else | 460 #else |
458 return OpDebug(one, two, op, result SkDEBUGPARAMS(false) SkDEBUGPARAMS(null
ptr)); | 461 return OpDebug(one, two, op, result SkDEBUGPARAMS(false) SkDEBUGPARAMS(null
ptr)); |
459 #endif | 462 #endif |
460 } | 463 } |
OLD | NEW |