From eed356d281adbf93ecbd89cb23913a7861cd8578 Mon Sep 17 00:00:00 2001 From: caryclark Date: Wed, 14 Sep 2016 07:18:20 -0700 Subject: Rewriting path writer The path writer takes constructs the output path out of curves that satisfy the pathop operation. Curves contain lists of t/point pairs that may not be comparable to each other. To match up curve ends in the output path, look for adjacent curves to have a shared membership rather than comparing point values. Use path utilities to connect partial curve lists into closed contours. Share the angle code that determines if a curve has become a degenerate line with the path writer. Clean up some code on the way, and delete some unused functions. TBR=reed@google.com BUG=5188 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321973005 Review-Url: https://codereview.chromium.org/2321973005 --- src/pathops/SkPathOpsDebug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pathops/SkPathOpsDebug.cpp') diff --git a/src/pathops/SkPathOpsDebug.cpp b/src/pathops/SkPathOpsDebug.cpp index 22ea12ea33..67bcee4070 100644 --- a/src/pathops/SkPathOpsDebug.cpp +++ b/src/pathops/SkPathOpsDebug.cpp @@ -1152,20 +1152,20 @@ SkString SkOpAngle::debugPart() const { SkString result; switch (this->segment()->verb()) { case SkPath::kLine_Verb: - result.printf(LINE_DEBUG_STR " id=%d", LINE_DEBUG_DATA(fCurvePart), + result.printf(LINE_DEBUG_STR " id=%d", LINE_DEBUG_DATA(fPart.fCurve), this->segment()->debugID()); break; case SkPath::kQuad_Verb: - result.printf(QUAD_DEBUG_STR " id=%d", QUAD_DEBUG_DATA(fCurvePart), + result.printf(QUAD_DEBUG_STR " id=%d", QUAD_DEBUG_DATA(fPart.fCurve), this->segment()->debugID()); break; case SkPath::kConic_Verb: result.printf(CONIC_DEBUG_STR " id=%d", - CONIC_DEBUG_DATA(fCurvePart, fCurvePart.fConic.fWeight), + CONIC_DEBUG_DATA(fPart.fCurve, fPart.fCurve.fConic.fWeight), this->segment()->debugID()); break; case SkPath::kCubic_Verb: - result.printf(CUBIC_DEBUG_STR " id=%d", CUBIC_DEBUG_DATA(fCurvePart), + result.printf(CUBIC_DEBUG_STR " id=%d", CUBIC_DEBUG_DATA(fPart.fCurve), this->segment()->debugID()); break; default: -- cgit v1.2.3