| Index: src/core/SkGeometry.h
|
| diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h
|
| index bafde61155bed86bcc79287daad9ce53fdb4c325..1c7cc712060b9cd3c621ba9b1ba9c6fff1e73e8c 100644
|
| --- a/src/core/SkGeometry.h
|
| +++ b/src/core/SkGeometry.h
|
| @@ -9,6 +9,22 @@
|
| #define SkGeometry_DEFINED
|
|
|
| #include "SkMatrix.h"
|
| +#include "SkNx.h"
|
| +
|
| +static inline Sk2s from_point(const SkPoint& point) {
|
| + return Sk2s::Load(&point.fX);
|
| +}
|
| +
|
| +static inline SkPoint to_point(const Sk2s& x) {
|
| + SkPoint point;
|
| + x.store(&point.fX);
|
| + return point;
|
| +}
|
| +
|
| +static inline Sk2s sk2s_cubic_eval(const Sk2s& A, const Sk2s& B, const Sk2s& C, const Sk2s& D,
|
| + const Sk2s& t) {
|
| + return ((A * t + B) * t + C) * t + D;
|
| +}
|
|
|
| /** Given a quadratic equation Ax^2 + Bx + C = 0, return 0, 1, 2 roots for the
|
| equation.
|
| @@ -107,6 +123,9 @@ void SkChopCubicAt(const SkPoint src[4], SkPoint dst[], const SkScalar t[],
|
| */
|
| void SkChopCubicAtHalf(const SkPoint src[4], SkPoint dst[7]);
|
|
|
| +void SkCubicToPoly(const SkPoint pts[4], SkPoint coeff[4]);
|
| +SkPoint SkEvalCubicPolyAt(const SkPoint coeff[4], SkScalar t);
|
| +
|
| /** Given the 4 coefficients for a cubic bezier (either X or Y values), look
|
| for extrema, and return the number of t-values that are found that represent
|
| these extrema. If the cubic has no extrema betwee (0..1) exclusive, the
|
|
|