diff options
Diffstat (limited to 'src/core/SkEdgeBuilder.cpp')
-rw-r--r-- | src/core/SkEdgeBuilder.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp index 22ee9ed346..22942f4d2a 100644 --- a/src/core/SkEdgeBuilder.cpp +++ b/src/core/SkEdgeBuilder.cpp @@ -377,14 +377,11 @@ int SkEdgeBuilder::build(const SkPath& path, const SkIRect* iclip, int shiftUp, // we ignore these, and just get the whole segment from // the corresponding line/quad/cubic verbs break; - case SkPath::kLine_Verb: { - SkPoint lines[SkLineClipper::kMaxPoints]; - int lineCount = SkLineClipper::ClipLine(pts, clip, lines, canCullToTheRight); - for (int i = 0; i < lineCount; i++) { - this->addLine(&lines[i]); + case SkPath::kLine_Verb: + if (clipper.clipLine(pts[0], pts[1], clip)) { + this->addClipper(&clipper); } break; - } case SkPath::kQuad_Verb: if (clipper.clipQuad(pts, clip)) { this->addClipper(&clipper); |