aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpAngle.h
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-06-06 15:22:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-06 20:27:34 +0000
commit3a4a3215f55212820d39853597ec268c5d84aa98 (patch)
tree6d8aac33b299fbf83ebf862465b0087e3971083b /src/pathops/SkOpAngle.h
parente0aeeddb78f18086799aa5e86da2b9e2f4ffa1dc (diff)
fix ops for very close rects
Pathops sorts line intersections to determine which edges to keep. If the intersections are very short, they may get discarded and the adjacent edge is used instead. If a pair of edges are 180 degrees apart, and an adjacent edge is part of the sort, it is ambiguous whether it is inside or outside the span. Add logic to look for this and evaluate the original data rather than the adjacent edge. In a separate CL, I'll add a specialization for rect/rect ops. R=halcanary@google.com Bug: skia:8049 Change-Id: I8d88d5520051d41303ea683e7d6b844f2afa9937 Reviewed-on: https://skia-review.googlesource.com/132661 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'src/pathops/SkOpAngle.h')
-rw-r--r--src/pathops/SkOpAngle.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pathops/SkOpAngle.h b/src/pathops/SkOpAngle.h
index d8615c3229..3d7a8950eb 100644
--- a/src/pathops/SkOpAngle.h
+++ b/src/pathops/SkOpAngle.h
@@ -99,6 +99,7 @@ private:
bool after(SkOpAngle* test);
void alignmentSameSide(const SkOpAngle* test, int* order) const;
int allOnOneSide(const SkOpAngle* test);
+ int allOnOriginalSide(const SkOpAngle* test);
bool checkCrossesZero() const;
bool checkParallel(SkOpAngle* );
bool computeSector();