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

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

Issue 1129193006: fix winding for path ops builder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile bug 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.h ('k') | src/pathops/SkPathOpsCommon.h » ('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 #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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 return true; 845 return true;
846 } 846 }
847 } 847 }
848 return false; 848 return false;
849 } 849 }
850 850
851 bool SkOpSegment::isXor() const { 851 bool SkOpSegment::isXor() const {
852 return fContour->isXor(); 852 return fContour->isXor();
853 } 853 }
854 854
855 void SkOpSegment::markAllDone() {
856 SkOpSpan* span = this->head();
857 do {
858 this->markDone(span);
859 } while ((span = span->next()->upCastable()));
860 }
861
855 SkOpSpanBase* SkOpSegment::markAndChaseDone(SkOpSpanBase* start, SkOpSpanBase* e nd) { 862 SkOpSpanBase* SkOpSegment::markAndChaseDone(SkOpSpanBase* start, SkOpSpanBase* e nd) {
856 int step = start->step(end); 863 int step = start->step(end);
857 SkOpSpan* minSpan = start->starter(end); 864 SkOpSpan* minSpan = start->starter(end);
858 markDone(minSpan); 865 markDone(minSpan);
859 SkOpSpanBase* last = NULL; 866 SkOpSpanBase* last = NULL;
860 SkOpSegment* other = this; 867 SkOpSegment* other = this;
861 while ((other = other->nextChase(&start, &step, &minSpan, &last))) { 868 while ((other = other->nextChase(&start, &step, &minSpan, &last))) {
862 if (other->done()) { 869 if (other->done()) {
863 SkASSERT(!last); 870 SkASSERT(!last);
864 break; 871 break;
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 int absOut = abs(outerWinding); 1680 int absOut = abs(outerWinding);
1674 int absIn = abs(innerWinding); 1681 int absIn = abs(innerWinding);
1675 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; 1682 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn;
1676 return result; 1683 return result;
1677 } 1684 }
1678 1685
1679 int SkOpSegment::windSum(const SkOpAngle* angle) const { 1686 int SkOpSegment::windSum(const SkOpAngle* angle) const {
1680 const SkOpSpan* minSpan = angle->start()->starter(angle->end()); 1687 const SkOpSpan* minSpan = angle->start()->starter(angle->end());
1681 return minSpan->windSum(); 1688 return minSpan->windSum();
1682 } 1689 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpSegment.h ('k') | src/pathops/SkPathOpsCommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698