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

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

Issue 1405383004: fix path op conic bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix w cast Created 5 years, 1 month 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 SkOpSpan* fPrev; // previous intersection point 365 SkOpSpan* fPrev; // previous intersection point
366 int fSpanAdds; // number of times intersections have been added to span 366 int fSpanAdds; // number of times intersections have been added to span
367 bool fAligned; 367 bool fAligned;
368 bool fChased; // set after span has been added to chase array 368 bool fChased; // set after span has been added to chase array
369 SkDEBUGCODE(int fCount); // number of pt/t pairs added 369 SkDEBUGCODE(int fCount); // number of pt/t pairs added
370 SkDEBUGCODE(int fID); 370 SkDEBUGCODE(int fID);
371 }; 371 };
372 372
373 class SkOpSpan : public SkOpSpanBase { 373 class SkOpSpan : public SkOpSpanBase {
374 public: 374 public:
375 bool alreadyAdded() const {
376 if (fAlreadyAdded) {
377 return true;
378 }
379 fAlreadyAdded = true;
380 return false;
381 }
382
375 bool clearCoincident() { 383 bool clearCoincident() {
376 SkASSERT(!final()); 384 SkASSERT(!final());
377 if (fCoincident == this) { 385 if (fCoincident == this) {
378 return false; 386 return false;
379 } 387 }
380 fCoincident = this; 388 fCoincident = this;
381 return true; 389 return true;
382 } 390 }
383 391
384 int computeWindSum(); 392 int computeWindSum();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 private: // no direct access to internals to avoid treating a span base as a sp an 507 private: // no direct access to internals to avoid treating a span base as a sp an
500 SkOpSpan* fCoincident; // linked list of spans coincident with this one (ma y point to itself) 508 SkOpSpan* fCoincident; // linked list of spans coincident with this one (ma y point to itself)
501 SkOpAngle* fToAngle; // points to next angle from span start to end 509 SkOpAngle* fToAngle; // points to next angle from span start to end
502 SkOpSpanBase* fNext; // next intersection point 510 SkOpSpanBase* fNext; // next intersection point
503 int fWindSum; // accumulated from contours surrounding this one. 511 int fWindSum; // accumulated from contours surrounding this one.
504 int fOppSum; // for binary operators: the opposite winding sum 512 int fOppSum; // for binary operators: the opposite winding sum
505 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident 513 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident
506 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v alue goes here 514 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v alue goes here
507 int fTopTTry; // specifies direction and t value to try next 515 int fTopTTry; // specifies direction and t value to try next
508 bool fDone; // if set, this span to next higher T has been processed 516 bool fDone; // if set, this span to next higher T has been processed
517 mutable bool fAlreadyAdded;
509 }; 518 };
510 519
511 #endif 520 #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