Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: src/pathops/SkPathOpsOp.cpp

Issue 2283993002: if the winding of the top can't be computed, give up (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698