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

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

Issue 2443243002: fix a few more fuzzes (Closed)
Patch Set: Created 4 years, 1 month 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/SkIntersections.cpp ('k') | src/pathops/SkOpSpan.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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 const SkOpSegment* innerOpp = ios->segment(); 787 const SkOpSegment* innerOpp = ios->segment();
788 SkASSERT(!innerOpp->done()); 788 SkASSERT(!innerOpp->done());
789 SkOpSegment* innerCoinWritable = const_cast<SkOpSegment*>(innerCoin) ; 789 SkOpSegment* innerCoinWritable = const_cast<SkOpSegment*>(innerCoin) ;
790 SkOpSegment* innerOppWritable = const_cast<SkOpSegment*>(innerOpp); 790 SkOpSegment* innerOppWritable = const_cast<SkOpSegment*>(innerOpp);
791 if (outerCoin == innerCoin) { 791 if (outerCoin == innerCoin) {
792 const SkOpPtT* oce = outer->coinPtTEnd(); 792 const SkOpPtT* oce = outer->coinPtTEnd();
793 if (oce->deleted()) { 793 if (oce->deleted()) {
794 return true; 794 return true;
795 } 795 }
796 const SkOpPtT* ice = inner->coinPtTEnd(); 796 const SkOpPtT* ice = inner->coinPtTEnd();
797 SkASSERT(!ice->deleted()); 797 FAIL_IF(ice->deleted());
798 if (outerOpp != innerOpp && this->overlap(ocs, oce, ics, ice, &o verS, &overE)) { 798 if (outerOpp != innerOpp && this->overlap(ocs, oce, ics, ice, &o verS, &overE)) {
799 (void) this->addIfMissing(ocs->starter(oce), ics->starter(ic e), 799 (void) this->addIfMissing(ocs->starter(oce), ics->starter(ic e),
800 overS, overE, outerOppWritable, innerOppWritable, ad ded 800 overS, overE, outerOppWritable, innerOppWritable, ad ded
801 SkDEBUGPARAMS(ocs->debugEnder(oce)) 801 SkDEBUGPARAMS(ocs->debugEnder(oce))
802 SkDEBUGPARAMS(ics->debugEnder(ice))); 802 SkDEBUGPARAMS(ics->debugEnder(ice)));
803 } 803 }
804 } else if (outerCoin == innerOpp) { 804 } else if (outerCoin == innerOpp) {
805 const SkOpPtT* oce = outer->coinPtTEnd(); 805 const SkOpPtT* oce = outer->coinPtTEnd();
806 SkASSERT(!oce->deleted()); 806 SkASSERT(!oce->deleted());
807 const SkOpPtT* ioe = inner->oppPtTEnd(); 807 const SkOpPtT* ioe = inner->oppPtTEnd();
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 } 1385 }
1386 do { 1386 do {
1387 if (coin->coinPtTStart()->segment() == deleted 1387 if (coin->coinPtTStart()->segment() == deleted
1388 || coin->coinPtTEnd()->segment() == deleted 1388 || coin->coinPtTEnd()->segment() == deleted
1389 || coin->oppPtTStart()->segment() == deleted 1389 || coin->oppPtTStart()->segment() == deleted
1390 || coin->oppPtTEnd()->segment() == deleted) { 1390 || coin->oppPtTEnd()->segment() == deleted) {
1391 this->release(fHead, coin); 1391 this->release(fHead, coin);
1392 } 1392 }
1393 } while ((coin = coin->next())); 1393 } while ((coin = coin->next()));
1394 } 1394 }
OLDNEW
« no previous file with comments | « src/pathops/SkIntersections.cpp ('k') | src/pathops/SkOpSpan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698