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

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

Issue 2321773002: pathops tiger checkpoint (Closed)
Patch Set: checkpoint (all not-under-development tests work) Created 4 years, 3 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') | 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 class SkOpSpan : public SkOpSpanBase { 419 class SkOpSpan : public SkOpSpanBase {
420 public: 420 public:
421 bool alreadyAdded() const { 421 bool alreadyAdded() const {
422 if (fAlreadyAdded) { 422 if (fAlreadyAdded) {
423 return true; 423 return true;
424 } 424 }
425 fAlreadyAdded = true; 425 fAlreadyAdded = true;
426 return false; 426 return false;
427 } 427 }
428 428
429 bool checkAlreadyAdded() const {
430 return fAlreadyAdded;
431 }
432
429 bool clearCoincident() { 433 bool clearCoincident() {
430 SkASSERT(!final()); 434 SkASSERT(!final());
431 if (fCoincident == this) { 435 if (fCoincident == this) {
432 return false; 436 return false;
433 } 437 }
434 fCoincident = this; 438 fCoincident = this;
435 return true; 439 return true;
436 } 440 }
437 441
438 int computeWindSum(); 442 int computeWindSum();
(...skipping 18 matching lines...) Expand all
457 #endif 461 #endif
458 void dumpCoin() const; 462 void dumpCoin() const;
459 bool dumpSpan() const; 463 bool dumpSpan() const;
460 464
461 bool done() const { 465 bool done() const {
462 SkASSERT(!final()); 466 SkASSERT(!final());
463 return fDone; 467 return fDone;
464 } 468 }
465 469
466 void init(SkOpSegment* parent, SkOpSpan* prev, double t, const SkPoint& pt); 470 void init(SkOpSegment* parent, SkOpSpan* prev, double t, const SkPoint& pt);
467 bool insertCoincidence(const SkOpSegment* , bool flipped); 471 bool insertCoincidence(const SkOpSegment* , bool flipped, bool ordered);
468 472
469 // Please keep this in sync with debugInsertCoincidence() 473 // Please keep this in sync with debugInsertCoincidence()
470 void insertCoincidence(SkOpSpan* coin) { 474 void insertCoincidence(SkOpSpan* coin) {
471 if (containsCoincidence(coin)) { 475 if (containsCoincidence(coin)) {
472 SkASSERT(coin->containsCoincidence(this)); 476 SkASSERT(coin->containsCoincidence(this));
473 return; 477 return;
474 } 478 }
475 debugValidate(); 479 debugValidate();
476 SkASSERT(this != coin); 480 SkASSERT(this != coin);
477 SkOpSpan* coinNext = coin->fCoincident; 481 SkOpSpan* coinNext = coin->fCoincident;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 int fWindSum; // accumulated from contours surrounding this one. 571 int fWindSum; // accumulated from contours surrounding this one.
568 int fOppSum; // for binary operators: the opposite winding sum 572 int fOppSum; // for binary operators: the opposite winding sum
569 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident 573 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident
570 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v alue goes here 574 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v alue goes here
571 int fTopTTry; // specifies direction and t value to try next 575 int fTopTTry; // specifies direction and t value to try next
572 bool fDone; // if set, this span to next higher T has been processed 576 bool fDone; // if set, this span to next higher T has been processed
573 mutable bool fAlreadyAdded; 577 mutable bool fAlreadyAdded;
574 }; 578 };
575 579
576 #endif 580 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkOpSpan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698