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

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

Issue 2357373002: fix next kevin fuzz (Closed)
Patch Set: Created 4 years, 2 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 #include "SkOpCoincidence.h" 7 #include "SkOpCoincidence.h"
8 #include "SkOpContour.h" 8 #include "SkOpContour.h"
9 #include "SkOpSegment.h" 9 #include "SkOpSegment.h"
10 #include "SkPathWriter.h" 10 #include "SkPathWriter.h"
(...skipping 21 matching lines...) Expand all
32 if (fPt != check->fPt) { 32 if (fPt != check->fPt) {
33 return false; 33 return false;
34 } 34 }
35 SkASSERT(this != check); 35 SkASSERT(this != check);
36 const SkOpSegment* segment = this->segment(); 36 const SkOpSegment* segment = this->segment();
37 SkASSERT(segment == check->segment()); 37 SkASSERT(segment == check->segment());
38 return segment->collapsed(); 38 return segment->collapsed();
39 } 39 }
40 40
41 bool SkOpPtT::contains(const SkOpPtT* check) const { 41 bool SkOpPtT::contains(const SkOpPtT* check) const {
42 SkASSERT(this != check); 42 SkOPASSERT(this != check);
43 const SkOpPtT* ptT = this; 43 const SkOpPtT* ptT = this;
44 const SkOpPtT* stopPtT = ptT; 44 const SkOpPtT* stopPtT = ptT;
45 while ((ptT = ptT->next()) != stopPtT) { 45 while ((ptT = ptT->next()) != stopPtT) {
46 if (ptT == check) { 46 if (ptT == check) {
47 return true; 47 return true;
48 } 48 }
49 } 49 }
50 return false; 50 return false;
51 } 51 }
52 52
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 void SkOpSpan::setWindSum(int windSum) { 529 void SkOpSpan::setWindSum(int windSum) {
530 SkASSERT(!final()); 530 SkASSERT(!final());
531 if (fWindSum != SK_MinS32 && fWindSum != windSum) { 531 if (fWindSum != SK_MinS32 && fWindSum != windSum) {
532 this->globalState()->setWindingFailed(); 532 this->globalState()->setWindingFailed();
533 return; 533 return;
534 } 534 }
535 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); 535 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM);
536 fWindSum = windSum; 536 fWindSum = windSum;
537 } 537 }
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