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

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

Issue 2103863005: fix another pathops fuzz bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « src/pathops/SkPathOpsCommon.cpp ('k') | 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 18 matching lines...) Expand all
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
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 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCommon.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698