void SkOpSpan::release(const SkOpPtT* kept) { SkDEBUGCODE(fDebugDeleted = true); SkOPASSERT(kept->span() != this); SkASSERT(!final()); SkOpSpan* prev = this->prev(); SkASSERT(prev); SkOpSpanBase* next = this->next(); SkASSERT(next); prev->setNext(next); next->setPrev(prev); this->segment()->release(this); SkOpCoincidence* coincidence = this->globalState()->coincidence(); if (coincidence) { coincidence->fixUp(this->ptT(), kept); } this->ptT()->setDeleted(); SkOpPtT* stopPtT = this->ptT(); SkOpPtT* testPtT = stopPtT; const SkOpSpanBase* keptSpan = kept->span(); do { if (this == testPtT->span()) { testPtT->setSpan(keptSpan); } } while ((testPtT = testPtT->next()) != stopPtT); }