void SkEdgeBuilder::addLine(const SkPoint pts[]) { SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc); if (edge->setLine(pts[0], pts[1], fShiftUp)) { fList.push(edge); } else { // TODO: unallocate edge from storage... } }
void SkEdgeBuilder::addLine(const SkPoint pts[]) { SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc); if (edge->setLine(pts[0], pts[1], fShiftUp)) { if (vertical_line(edge) && fList.count()) { Combine combine = CombineVertical(edge, *(fList.end() - 1)); if (kNo_Combine != combine) { if (kTotal_Combine == combine) { fList.pop(); } goto unallocate_edge; } } fList.push(edge); } else { unallocate_edge: ; // TODO: unallocate edge from storage... } }