本文整理汇总了C++中SkOpSegment::markAllDone方法的典型用法代码示例。如果您正苦于以下问题:C++ SkOpSegment::markAllDone方法的具体用法?C++ SkOpSegment::markAllDone怎么用?C++ SkOpSegment::markAllDone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkOpSegment
的用法示例。
在下文中一共展示了SkOpSegment::markAllDone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mergeMatches
// please keep in sync with debugMergeMatches()
// Look to see if pt-t linked list contains same segment more than once
// if so, and if each pt-t is directly pointed to by spans in that segment,
// merge them
// keep the points, but remove spans so that the segment doesn't have 2 or more
// spans pointing to the same pt-t loop at different loop elements
void SkOpSpanBase::mergeMatches(SkOpSpanBase* opp) {
SkOpPtT* test = &fPtT;
SkOpPtT* testNext;
const SkOpPtT* stop = test;
do {
testNext = test->next();
if (test->deleted()) {
continue;
}
SkOpSpanBase* testBase = test->span();
SkASSERT(testBase->ptT() == test);
SkOpSegment* segment = test->segment();
if (segment->done()) {
continue;
}
SkOpPtT* inner = opp->ptT();
const SkOpPtT* innerStop = inner;
do {
if (inner->segment() != segment) {
continue;
}
if (inner->deleted()) {
continue;
}
SkOpSpanBase* innerBase = inner->span();
SkASSERT(innerBase->ptT() == inner);
// when the intersection is first detected, the span base is marked if there are
// more than one point in the intersection.
if (!zero_or_one(inner->fT)) {
innerBase->upCast()->release(test);
} else {
SkOPASSERT(inner->fT != test->fT);
if (!zero_or_one(test->fT)) {
testBase->upCast()->release(inner);
} else {
segment->markAllDone(); // mark segment as collapsed
SkDEBUGCODE(testBase->debugSetDeleted());
test->setDeleted();
SkDEBUGCODE(innerBase->debugSetDeleted());
inner->setDeleted();
}
}
#ifdef SK_DEBUG // assert if another undeleted entry points to segment
const SkOpPtT* debugInner = inner;
while ((debugInner = debugInner->next()) != innerStop) {
if (debugInner->segment() != segment) {
continue;
}
if (debugInner->deleted()) {
continue;
}
SkOPASSERT(0);
}
#endif
break;
} while ((inner = inner->next()) != innerStop);
} while ((test = testNext) != stop);
this->checkForCollapsedCoincidence();
}