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

Unified Diff: src/pathops/SkOpContour.cpp

Issue 1111333002: compute initial winding from projected rays (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add missing test reference 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpContour.cpp
diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp
index 107c83169b73b419f0dab2e048d91fa15f877b9f..178ba3e89ccc34fb921c03a4251ceec75af70944 100644
--- a/src/pathops/SkOpContour.cpp
+++ b/src/pathops/SkOpContour.cpp
@@ -37,28 +37,6 @@ SkOpSegment* SkOpContour::addCurve(SkPath::Verb verb, const SkPoint pts[4],
return NULL;
}
-SkOpSegment* SkOpContour::nonVerticalSegment(SkOpSpanBase** start, SkOpSpanBase** end) {
- int segmentCount = fSortedSegments.count();
- SkASSERT(segmentCount > 0);
- for (int sortedIndex = fFirstSorted; sortedIndex < segmentCount; ++sortedIndex) {
- SkOpSegment* testSegment = fSortedSegments[sortedIndex];
- if (testSegment->done()) {
- continue;
- }
- SkOpSpanBase* span = testSegment->head();
- SkOpSpanBase* testS, * testE;
- while (SkOpSegment::NextCandidate(span, &testS, &testE)) {
- if (!testSegment->isVertical(testS, testE)) {
- *start = testS;
- *end = testE;
- return testSegment;
- }
- span = span->upCast()->next();
- }
- }
- return NULL;
-}
-
void SkOpContour::toPath(SkPathWriter* path) const {
const SkPoint& pt = fHead.pts()[0];
path->deferredMove(pt);
@@ -69,41 +47,6 @@ void SkOpContour::toPath(SkPathWriter* path) const {
path->close();
}
-void SkOpContour::topSortableSegment(const SkDPoint& topLeft, SkDPoint* bestXY,
- SkOpSegment** topStart) {
- int segmentCount = fSortedSegments.count();
- SkASSERT(segmentCount > 0);
- int sortedIndex = fFirstSorted;
- fDone = true; // may be cleared below
- for ( ; sortedIndex < segmentCount; ++sortedIndex) {
- SkOpSegment* testSegment = fSortedSegments[sortedIndex];
- if (testSegment->done()) {
- if (sortedIndex == fFirstSorted) {
- ++fFirstSorted;
- }
- continue;
- }
- fDone = false;
- SkDPoint testXY = testSegment->activeLeftTop(NULL);
- if (*topStart) {
- if (testXY.fY < topLeft.fY) {
- continue;
- }
- if (testXY.fY == topLeft.fY && testXY.fX < topLeft.fX) {
- continue;
- }
- if (bestXY->fY < testXY.fY) {
- continue;
- }
- if (bestXY->fY == testXY.fY && bestXY->fX < testXY.fX) {
- continue;
- }
- }
- *topStart = testSegment;
- *bestXY = testXY;
- }
-}
-
SkOpSegment* SkOpContour::undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr) {
SkOpSegment* segment = &fHead;
do {
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698