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

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

Issue 1140813002: deal more consistently with unsortable edges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix linux warning Created 5 years, 7 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/SkOpSegment.cpp ('k') | src/pathops/SkOpSpan.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 2012 Google Inc. 2 * Copyright 2012 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 SkOpSpan_DEFINED 7 #ifndef SkOpSpan_DEFINED
8 #define SkOpSpan_DEFINED 8 #define SkOpSpan_DEFINED
9 9
10 #include "SkPathOpsDebug.h" 10 #include "SkPathOpsDebug.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 public: 334 public:
335 bool clearCoincident() { 335 bool clearCoincident() {
336 SkASSERT(!final()); 336 SkASSERT(!final());
337 if (fCoincident == this) { 337 if (fCoincident == this) {
338 return false; 338 return false;
339 } 339 }
340 fCoincident = this; 340 fCoincident = this;
341 return true; 341 return true;
342 } 342 }
343 343
344 int computeWindSum();
344 bool containsCoincidence(const SkOpSegment* ) const; 345 bool containsCoincidence(const SkOpSegment* ) const;
345 346
346 bool containsCoincidence(const SkOpSpan* coin) const { 347 bool containsCoincidence(const SkOpSpan* coin) const {
347 SkASSERT(this != coin); 348 SkASSERT(this != coin);
348 const SkOpSpan* next = this; 349 const SkOpSpan* next = this;
349 while ((next = next->fCoincident) != this) { 350 while ((next = next->fCoincident) != this) {
350 if (next == coin) { 351 if (next == coin) {
351 return true; 352 return true;
352 } 353 }
353 } 354 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 SkOpSpanBase* fNext; // next intersection point 462 SkOpSpanBase* fNext; // next intersection point
462 int fWindSum; // accumulated from contours surrounding this one. 463 int fWindSum; // accumulated from contours surrounding this one.
463 int fOppSum; // for binary operators: the opposite winding sum 464 int fOppSum; // for binary operators: the opposite winding sum
464 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident 465 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident
465 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v alue goes here 466 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v alue goes here
466 int fTopTTry; // specifies direction and t value to try next 467 int fTopTTry; // specifies direction and t value to try next
467 bool fDone; // if set, this span to next higher T has been processed 468 bool fDone; // if set, this span to next higher T has been processed
468 }; 469 };
469 470
470 #endif 471 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpSegment.cpp ('k') | src/pathops/SkOpSpan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698