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

Side by Side Diff: src/pathops/SkPathOpsTSect.h

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.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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkPathOpsTSect_DEFINED 7 #ifndef SkPathOpsTSect_DEFINED
8 #define SkPathOpsTSect_DEFINED 8 #define SkPathOpsTSect_DEFINED
9 9
10 #include "SkChunkAlloc.h" 10 #include "SkChunkAlloc.h"
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 SkTSwap(oppStartT, oppEndT); 1213 SkTSwap(oppStartT, oppEndT);
1214 } 1214 }
1215 SkOPASSERT(oppStartT < oppEndT); 1215 SkOPASSERT(oppStartT < oppEndT);
1216 SkASSERT(coinStart == first->fStartT); 1216 SkASSERT(coinStart == first->fStartT);
1217 SkASSERT(coinEnd == last->fEndT); 1217 SkASSERT(coinEnd == last->fEndT);
1218 SkOPASSERT(oppStartT == oppFirst->fStartT); 1218 SkOPASSERT(oppStartT == oppFirst->fStartT);
1219 SkOPASSERT(oppEndT == oppLast->fEndT); 1219 SkOPASSERT(oppEndT == oppLast->fEndT);
1220 if (!oppFirst) { 1220 if (!oppFirst) {
1221 return nullptr; 1221 return nullptr;
1222 } 1222 }
1223 if (!oppLast) {
1224 return nullptr;
1225 }
1223 // reduce coincident runs to single entries 1226 // reduce coincident runs to single entries
1224 this->validate(); 1227 this->validate();
1225 sect2->validate(); 1228 sect2->validate();
1226 bool deleteEmptySpans = this->updateBounded(first, last, oppFirst); 1229 bool deleteEmptySpans = this->updateBounded(first, last, oppFirst);
1227 deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first); 1230 deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first);
1228 this->removeSpanRange(first, last); 1231 this->removeSpanRange(first, last);
1229 sect2->removeSpanRange(oppFirst, oppLast); 1232 sect2->removeSpanRange(oppFirst, oppLast);
1230 first->fEndT = last->fEndT; 1233 first->fEndT = last->fEndT;
1231 first->resetBounds(this->fCurve); 1234 first->resetBounds(this->fCurve);
1232 first->fCoinStart.setPerp(fCurve, first->fStartT, first->fPart[0], sect2->fC urve); 1235 first->fCoinStart.setPerp(fCurve, first->fStartT, first->fPart[0], sect2->fC urve);
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2295 --last; 2298 --last;
2296 } else { 2299 } else {
2297 intersections->setCoincident(index++); 2300 intersections->setCoincident(index++);
2298 } 2301 }
2299 intersections->setCoincident(index); 2302 intersections->setCoincident(index);
2300 } 2303 }
2301 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); 2304 SkASSERT(intersections->used() <= TCurve::kMaxIntersections);
2302 } 2305 }
2303 2306
2304 #endif 2307 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698