Home | History | Annotate | Download | only in core

Lines Matching full:edge

25 SkEdgeBuilder::Combine SkEdgeBuilder::CombineVertical(const SkEdge* edge, SkEdge* last) {
26 if (last->fCurveCount || last->fDX || edge->fX != last->fX) {
29 if (edge->fWinding == last->fWinding) {
30 if (edge->fLastY + 1 == last->fFirstY) {
31 last->fFirstY = edge->fFirstY;
34 if (edge->fFirstY == last->fLastY + 1) {
35 last->fLastY = edge->fLastY;
40 if (edge->fFirstY == last->fFirstY) {
41 if (edge->fLastY == last->fLastY) {
44 if (edge->fLastY < last->fLastY) {
45 last->fFirstY = edge->fLastY + 1;
49 last->fLastY = edge->fLastY;
50 last->fWinding = edge->fWinding;
53 if (edge->fLastY == last->fLastY) {
54 if (edge->fFirstY > last->fFirstY) {
55 last->fLastY = edge->fFirstY - 1;
59 last->fFirstY = edge->fFirstY;
60 last->fWinding = edge->fWinding;
66 static bool vertical_line(const SkEdge* edge) {
67 return !edge->fDX && !edge->fCurveCount;
71 SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc);
72 if (edge->setLine(pts[0], pts[1], fShiftUp)) {
73 if (vertical_line(edge) && fList.count()) {
74 Combine combine = CombineVertical(edge, *(fList.end() - 1));
82 fList.push(edge);
86 // TODO: unallocate edge from storage...
91 SkQuadraticEdge* edge = typedAllocThrow<SkQuadraticEdge>(fAlloc);
92 if (edge->setQuadratic(pts, fShiftUp)) {
93 fList.push(edge);
95 // TODO: unallocate edge from storage...
100 SkCubicEdge* edge = typedAllocThrow<SkCubicEdge>(fAlloc);
101 if (edge->setCubic(pts, fShiftUp)) {
102 fList.push(edge);
104 // TODO: unallocate edge from storage...
138 SkEdgeBuilder::Combine SkEdgeBuilder::checkVertical(const SkEdge* edge, SkEdge** edgePtr) {
139 return !vertical_line(edge) || edgePtr <= fEdgeList ? kNo_Combine :
140 CombineVertical(edge, edgePtr[-1]);
161 SkEdge* edge = reinterpret_cast<SkEdge*>(storage);
182 if (edge->setLine(lines[i], lines[i + 1], shiftUp)) {
183 Combine combine = checkVertical(edge, edgePtr);
185 *edgePtr++ = edge++;
207 if (edge->setLine(pts[0], pts[1], shiftUp)) {
208 Combine combine = checkVertical(edge, edgePtr);
210 *edgePtr++ = edge++;
222 SkASSERT((char*)edge <= (char*)fEdgeList);