aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpEdgeBuilder.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-09-14 07:18:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-14 07:18:20 -0700
commiteed356d281adbf93ecbd89cb23913a7861cd8578 (patch)
treee1f354471538f9484de7bd53eb9fafebd18f411a /src/pathops/SkOpEdgeBuilder.h
parent8bbcd5aab81dc0742c3367479c0c9d97363b1203 (diff)
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
Diffstat (limited to 'src/pathops/SkOpEdgeBuilder.h')
-rw-r--r--src/pathops/SkOpEdgeBuilder.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pathops/SkOpEdgeBuilder.h b/src/pathops/SkOpEdgeBuilder.h
index 1a78a2137e..c6fc7dcb07 100644
--- a/src/pathops/SkOpEdgeBuilder.h
+++ b/src/pathops/SkOpEdgeBuilder.h
@@ -12,7 +12,8 @@
class SkOpEdgeBuilder {
public:
- SkOpEdgeBuilder(const SkPathWriter& path, SkOpContour* contours2, SkOpGlobalState* globalState)
+ SkOpEdgeBuilder(const SkPathWriter& path, SkOpContourHead* contours2,
+ SkOpGlobalState* globalState)
: fGlobalState(globalState)
, fPath(path.nativePath())
, fContoursHead(contours2)
@@ -20,7 +21,7 @@ public:
init();
}
- SkOpEdgeBuilder(const SkPath& path, SkOpContour* contours2, SkOpGlobalState* globalState)
+ SkOpEdgeBuilder(const SkPath& path, SkOpContourHead* contours2, SkOpGlobalState* globalState)
: fGlobalState(globalState)
, fPath(&path)
, fContoursHead(contours2)
@@ -37,7 +38,6 @@ public:
}
}
- int count() const;
bool finish();
const SkOpContour* head() const {
@@ -60,7 +60,7 @@ private:
SkTDArray<SkScalar> fWeights;
SkTDArray<uint8_t> fPathVerbs;
SkOpContour* fCurrentContour;
- SkOpContour* fContoursHead;
+ SkOpContourHead* fContoursHead;
SkPathOpsMask fXorMask[2];
int fSecondHalf;
bool fOperand;