diff options
Diffstat (limited to 'src/pathops/SkOpContour.cpp')
-rw-r--r-- | src/pathops/SkOpContour.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp index 3b2318c306..981bd29573 100644 --- a/src/pathops/SkOpContour.cpp +++ b/src/pathops/SkOpContour.cpp @@ -10,7 +10,7 @@ #include "SkReduceOrder.h" #include "SkTSort.h" -SkOpSegment* SkOpContour::addCurve(SkPath::Verb verb, const SkPoint pts[4]) { +SkOpSegment* SkOpContour::addCurve(SkPath::Verb verb, const SkPoint pts[4], SkScalar weight) { SkChunkAlloc* allocator = this->globalState()->allocator(); switch (verb) { case SkPath::kLine_Verb: { @@ -24,7 +24,9 @@ SkOpSegment* SkOpContour::addCurve(SkPath::Verb verb, const SkPoint pts[4]) { return appendSegment().addQuad(ptStorage, this); } break; case SkPath::kConic_Verb: { - SkASSERT(0); // the original curve is a cubic, which will never reduce to a conic + SkPoint* ptStorage = SkOpTAllocator<SkPoint>::AllocateArray(allocator, 3); + memcpy(ptStorage, pts, sizeof(SkPoint) * 3); + return appendSegment().addConic(ptStorage, weight, this); } break; case SkPath::kCubic_Verb: { SkPoint* ptStorage = SkOpTAllocator<SkPoint>::AllocateArray(allocator, 4); |