shape ops work in progress
Review URL: https://codereview.appspot.com/6392058 git-svn-id: http://skia.googlecode.com/svn/trunk@4591 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
c665832fbf
commit
5c286d3286
@ -1157,9 +1157,10 @@ public:
|
|||||||
// it is guaranteed to have an end which describes a non-zero length (?)
|
// it is guaranteed to have an end which describes a non-zero length (?)
|
||||||
// winding -1 means ccw, 1 means cw
|
// winding -1 means ccw, 1 means cw
|
||||||
// firstFind allows coincident edges to be treated differently
|
// firstFind allows coincident edges to be treated differently
|
||||||
Segment* findNext(SkTDArray<Span*>& chase, int winding, const int startIndex,
|
Segment* findNext(SkTDArray<Span*>& chase, int winding,
|
||||||
const int endIndex,
|
const int startIndex, const int endIndex,
|
||||||
int& nextStart, int& nextEnd, int& flipped, bool firstFind) {
|
int& nextStart, int& nextEnd, int& flipped, bool firstFind
|
||||||
|
,bool active /* active param is debugging only */ ) {
|
||||||
SkASSERT(startIndex != endIndex);
|
SkASSERT(startIndex != endIndex);
|
||||||
int count = fTs.count();
|
int count = fTs.count();
|
||||||
SkASSERT(startIndex < endIndex ? startIndex < count - 1
|
SkASSERT(startIndex < endIndex ? startIndex < count - 1
|
||||||
@ -1217,11 +1218,14 @@ public:
|
|||||||
}
|
}
|
||||||
firstEdge = false;
|
firstEdge = false;
|
||||||
if (!winding) {
|
if (!winding) {
|
||||||
|
if (!active) {
|
||||||
|
SkASSERT(nextAngle->segment() == this);
|
||||||
|
markWinding(SkMin32(nextAngle->start(), nextAngle->end()),
|
||||||
|
maxWinding);
|
||||||
|
SkDebugf("%s inactive\n", __FUNCTION__);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (!foundAngle) {
|
if (!foundAngle) {
|
||||||
#if 0
|
|
||||||
nextAngle->segment()->markWinding(
|
|
||||||
SkMin32(nextAngle->start(), nextAngle->end()), maxWinding);
|
|
||||||
#endif
|
|
||||||
foundAngle = nextAngle;
|
foundAngle = nextAngle;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -2941,7 +2945,8 @@ static void bridge(SkTDArray<Contour*>& contourList, SkPath& simple) {
|
|||||||
int nextStart, nextEnd, flipped = 1;
|
int nextStart, nextEnd, flipped = 1;
|
||||||
Segment* next = current->findNext(chaseArray,
|
Segment* next = current->findNext(chaseArray,
|
||||||
winding + spanWinding, index,
|
winding + spanWinding, index,
|
||||||
endIndex, nextStart, nextEnd, flipped, firstTime);
|
endIndex, nextStart, nextEnd, flipped, firstTime
|
||||||
|
, active /* active is debugging only */ );
|
||||||
if (!next) {
|
if (!next) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ static const SimplifyFindNextTest::Segment* testCommon(
|
|||||||
int nextStart, nextEnd, flipped = 1;
|
int nextStart, nextEnd, flipped = 1;
|
||||||
SkTDArray<SimplifyFindNextTest::Span*> chaseArray;
|
SkTDArray<SimplifyFindNextTest::Span*> chaseArray;
|
||||||
SimplifyFindNextTest::Segment* next = segment.findNext(chaseArray, winding,
|
SimplifyFindNextTest::Segment* next = segment.findNext(chaseArray, winding,
|
||||||
startIndex, endIndex, nextStart, nextEnd, flipped, true);
|
startIndex, endIndex, nextStart, nextEnd, flipped, true, true);
|
||||||
pts[1] = next->xyAtT(&next->span(nextStart));
|
pts[1] = next->xyAtT(&next->span(nextStart));
|
||||||
SkASSERT(pts[0] == pts[1]);
|
SkASSERT(pts[0] == pts[1]);
|
||||||
return next;
|
return next;
|
||||||
|
Loading…
Reference in New Issue
Block a user