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

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

Issue 2255243003: fix fuzzes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/SkOpCoincidence.h ('k') | src/pathops/SkPathOpsTSect.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkOpSegment.h" 8 #include "SkOpSegment.h"
9 #include "SkPathOpsTSect.h" 9 #include "SkPathOpsTSect.h"
10 10
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 } 1357 }
1358 1358
1359 // Please keep this in sync with debugMark() 1359 // Please keep this in sync with debugMark()
1360 /* this sets up the coincidence links in the segments when the coincidence cross es multiple spans */ 1360 /* this sets up the coincidence links in the segments when the coincidence cross es multiple spans */
1361 bool SkOpCoincidence::mark() { 1361 bool SkOpCoincidence::mark() {
1362 SkCoincidentSpans* coin = fHead; 1362 SkCoincidentSpans* coin = fHead;
1363 if (!coin) { 1363 if (!coin) {
1364 return true; 1364 return true;
1365 } 1365 }
1366 do { 1366 do {
1367 if (!coin->coinPtTStartWritable()->span()->upCastable()) {
1368 return false;
1369 }
1367 SkOpSpan* start = coin->coinPtTStartWritable()->span()->upCast(); 1370 SkOpSpan* start = coin->coinPtTStartWritable()->span()->upCast();
1368 SkASSERT(!start->deleted()); 1371 SkASSERT(!start->deleted());
1369 SkOpSpanBase* end = coin->coinPtTEndWritable()->span(); 1372 SkOpSpanBase* end = coin->coinPtTEndWritable()->span();
1370 SkASSERT(!end->deleted()); 1373 SkASSERT(!end->deleted());
1371 SkOpSpanBase* oStart = coin->oppPtTStartWritable()->span(); 1374 SkOpSpanBase* oStart = coin->oppPtTStartWritable()->span();
1372 SkASSERT(!oStart->deleted()); 1375 SkASSERT(!oStart->deleted());
1373 SkOpSpanBase* oEnd = coin->oppPtTEndWritable()->span(); 1376 SkOpSpanBase* oEnd = coin->oppPtTEndWritable()->span();
1374 SkASSERT(!oEnd->deleted()); 1377 SkASSERT(!oEnd->deleted());
1375 bool flipped = coin->flipped(); 1378 bool flipped = coin->flipped();
1376 if (flipped) { 1379 if (flipped) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 this->release(fHead, coin); 1475 this->release(fHead, coin);
1473 } 1476 }
1474 } while ((coin = coin->next())); 1477 } while ((coin = coin->next()));
1475 } 1478 }
1476 1479
1477 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S kOpPtT* testS, 1480 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S kOpPtT* testS,
1478 const SkOpPtT* testE) const { 1481 const SkOpPtT* testE) const {
1479 return testS->segment()->testForCoincidence(testS, testE, testS->span(), 1482 return testS->segment()->testForCoincidence(testS, testE, testS->span(),
1480 testE->span(), outer->coinPtTStart()->segment()); 1483 testE->span(), outer->coinPtTStart()->segment());
1481 } 1484 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpCoincidence.h ('k') | src/pathops/SkPathOpsTSect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698