diff options
author | 2015-03-24 13:55:33 -0700 | |
---|---|---|
committer | 2015-03-24 13:55:33 -0700 | |
commit | 0dc4dd6dda9a7912f696b46d9c02155ec1d1ba5f (patch) | |
tree | 994c85a8e418986415175ddccc71adf924df3846 /src/pathops/SkPathOpsLine.h | |
parent | 82dec0e16ae10026194ce45b67af931700510450 (diff) |
Revert of pathops version two (patchset #16 id:150001 of https://codereview.chromium.org/1002693002/)
Reason for revert:
ASAN investigation
Original issue's description:
> pathops version two
>
> R=reed@google.com
>
> marked 'no commit' to attempt to get trybots to run
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/ccec0f958ffc71a9986d236bc2eb335cb2111119
TBR=caryclark@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1029993002
Diffstat (limited to 'src/pathops/SkPathOpsLine.h')
-rw-r--r-- | src/pathops/SkPathOpsLine.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/pathops/SkPathOpsLine.h b/src/pathops/SkPathOpsLine.h index bb25162860..74eb615348 100644 --- a/src/pathops/SkPathOpsLine.h +++ b/src/pathops/SkPathOpsLine.h @@ -20,20 +20,27 @@ struct SkDLine { fPts[1] = pts[1]; } + static SkDLine SubDivide(const SkPoint a[2], double t1, double t2) { + SkDLine line; + line.set(a); + return line.subDivide(t1, t2); + } + double exactPoint(const SkDPoint& xy) const; static double ExactPointH(const SkDPoint& xy, double left, double right, double y); static double ExactPointV(const SkDPoint& xy, double top, double bottom, double x); - - // only used by testing double isLeft(const SkDPoint& pt) const; - double nearPoint(const SkDPoint& xy, bool* unequal) const; bool nearRay(const SkDPoint& xy) const; static double NearPointH(const SkDPoint& xy, double left, double right, double y); static double NearPointV(const SkDPoint& xy, double top, double bottom, double x); + static bool NearRay(double dx1, double dy1, double dx2, double dy2); SkDPoint ptAtT(double t) const; + SkDLine subDivide(double t1, double t2) const; void dump() const; +private: + SkDVector tangent() const { return fPts[0] - fPts[1]; } }; #endif |