| OLD | NEW | 
|---|
| 1 | 1 | 
| 2 /* | 2 /* | 
| 3  * Copyright 2011 Google Inc. | 3  * Copyright 2011 Google Inc. | 
| 4  * | 4  * | 
| 5  * Use of this source code is governed by a BSD-style license that can be | 5  * Use of this source code is governed by a BSD-style license that can be | 
| 6  * found in the LICENSE file. | 6  * found in the LICENSE file. | 
| 7  */ | 7  */ | 
| 8 #include "SkEdgeBuilder.h" | 8 #include "SkEdgeBuilder.h" | 
| 9 #include "SkPath.h" | 9 #include "SkPath.h" | 
| 10 #include "SkEdge.h" | 10 #include "SkEdge.h" | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 35     SkQuadraticEdge* edge = typedAllocThrow<SkQuadraticEdge>(fAlloc); | 35     SkQuadraticEdge* edge = typedAllocThrow<SkQuadraticEdge>(fAlloc); | 
| 36     if (edge->setQuadratic(pts, fShiftUp)) { | 36     if (edge->setQuadratic(pts, fShiftUp)) { | 
| 37         fList.push(edge); | 37         fList.push(edge); | 
| 38     } else { | 38     } else { | 
| 39         // TODO: unallocate edge from storage... | 39         // TODO: unallocate edge from storage... | 
| 40     } | 40     } | 
| 41 } | 41 } | 
| 42 | 42 | 
| 43 void SkEdgeBuilder::addCubic(const SkPoint pts[]) { | 43 void SkEdgeBuilder::addCubic(const SkPoint pts[]) { | 
| 44     SkCubicEdge* edge = typedAllocThrow<SkCubicEdge>(fAlloc); | 44     SkCubicEdge* edge = typedAllocThrow<SkCubicEdge>(fAlloc); | 
| 45     if (edge->setCubic(pts, NULL, fShiftUp)) { | 45     if (edge->setCubic(pts, fShiftUp)) { | 
| 46         fList.push(edge); | 46         fList.push(edge); | 
| 47     } else { | 47     } else { | 
| 48         // TODO: unallocate edge from storage... | 48         // TODO: unallocate edge from storage... | 
| 49     } | 49     } | 
| 50 } | 50 } | 
| 51 | 51 | 
| 52 void SkEdgeBuilder::addClipper(SkEdgeClipper* clipper) { | 52 void SkEdgeBuilder::addClipper(SkEdgeClipper* clipper) { | 
| 53     SkPoint      pts[4]; | 53     SkPoint      pts[4]; | 
| 54     SkPath::Verb verb; | 54     SkPath::Verb verb; | 
| 55 | 55 | 
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 256                 } | 256                 } | 
| 257                 default: | 257                 default: | 
| 258                     SkDEBUGFAIL("unexpected verb"); | 258                     SkDEBUGFAIL("unexpected verb"); | 
| 259                     break; | 259                     break; | 
| 260             } | 260             } | 
| 261         } | 261         } | 
| 262     } | 262     } | 
| 263     fEdgeList = fList.begin(); | 263     fEdgeList = fList.begin(); | 
| 264     return fList.count(); | 264     return fList.count(); | 
| 265 } | 265 } | 
| OLD | NEW | 
|---|