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

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

Issue 2250573003: fix fuzz bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: another fuzz fix 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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 this->removeSpan(test); 1152 this->removeSpan(test);
1153 } 1153 }
1154 } 1154 }
1155 } 1155 }
1156 1156
1157 template<typename TCurve, typename OppCurve> 1157 template<typename TCurve, typename OppCurve>
1158 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::extractCoincident( 1158 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::extractCoincident(
1159 SkTSect<OppCurve, TCurve>* sect2, 1159 SkTSect<OppCurve, TCurve>* sect2,
1160 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) { 1160 SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) {
1161 first = findCoincidentRun(first, &last); 1161 first = findCoincidentRun(first, &last);
1162 if (!first) { 1162 if (!first || !last) {
1163 return nullptr; 1163 return nullptr;
1164 } 1164 }
1165 // march outwards to find limit of coincidence from here to previous and nex t spans 1165 // march outwards to find limit of coincidence from here to previous and nex t spans
1166 double startT = first->fStartT; 1166 double startT = first->fStartT;
1167 double oppStartT SK_INIT_TO_AVOID_WARNING; 1167 double oppStartT SK_INIT_TO_AVOID_WARNING;
1168 double oppEndT SK_INIT_TO_AVOID_WARNING; 1168 double oppEndT SK_INIT_TO_AVOID_WARNING;
1169 SkTSpan<TCurve, OppCurve>* prev = first->fPrev; 1169 SkTSpan<TCurve, OppCurve>* prev = first->fPrev;
1170 SkASSERT(first->fCoinStart.isCoincident()); 1170 SkASSERT(first->fCoinStart.isCoincident());
1171 SkTSpan<OppCurve, TCurve>* oppFirst = first->findOppT(first->fCoinStart.perp T()); 1171 SkTSpan<OppCurve, TCurve>* oppFirst = first->findOppT(first->fCoinStart.perp T());
1172 SkOPASSERT(last->fCoinEnd.isCoincident()); 1172 SkOPASSERT(last->fCoinEnd.isCoincident());
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2295 --last; 2295 --last;
2296 } else { 2296 } else {
2297 intersections->setCoincident(index++); 2297 intersections->setCoincident(index++);
2298 } 2298 }
2299 intersections->setCoincident(index); 2299 intersections->setCoincident(index);
2300 } 2300 }
2301 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); 2301 SkASSERT(intersections->used() <= TCurve::kMaxIntersections);
2302 } 2302 }
2303 2303
2304 #endif 2304 #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