aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/core/SkGeometry.h9
-rw-r--r--include/core/SkPath.h26
2 files changed, 3 insertions, 32 deletions
diff --git a/include/core/SkGeometry.h b/include/core/SkGeometry.h
index 2c37fff3e4..6218ed1843 100644
--- a/include/core/SkGeometry.h
+++ b/include/core/SkGeometry.h
@@ -230,16 +230,7 @@ struct SkConic {
void computeAsQuadError(SkVector* err) const;
bool asQuadTol(SkScalar tol) const;
- /**
- * return the power-of-2 number of quads needed to approximate this conic
- * with a sequence of quads. Will be >= 0.
- */
int computeQuadPOW2(SkScalar tol) const;
-
- /**
- * Chop this conic into N quads, stored continguously in pts[], where
- * N = 1 << pow2. The amount of storage needed is (1 + 2 * N)
- */
int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const;
bool findXExtrema(SkScalar* t) const;
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 9300863c80..65612cbc93 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -413,14 +413,6 @@ public:
*/
void rQuadTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2);
- void conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
- SkScalar w);
- void conicTo(const SkPoint& p1, const SkPoint& p2, SkScalar w) {
- this->conicTo(p1.fX, p1.fY, p2.fX, p2.fY, w);
- }
- void rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
- SkScalar w);
-
/** Add a cubic bezier from the last point, approaching control points
(x1,y1) and (x2,y2), and ending at (x3,y3). If no moveTo() call has been
made for this contour, the first point is automatically set to (0,0).
@@ -787,8 +779,7 @@ public:
enum SegmentMask {
kLine_SegmentMask = 1 << 0,
kQuad_SegmentMask = 1 << 1,
- kConic_SegmentMask = 1 << 2,
- kCubic_SegmentMask = 1 << 3,
+ kCubic_SegmentMask = 1 << 2
};
/**
@@ -802,10 +793,9 @@ public:
kMove_Verb, //!< iter.next returns 1 point
kLine_Verb, //!< iter.next returns 2 points
kQuad_Verb, //!< iter.next returns 3 points
- kConic_Verb, //!< iter.next returns 3 points + iter.conicWeight()
kCubic_Verb, //!< iter.next returns 4 points
kClose_Verb, //!< iter.next returns 1 point (contour's moveTo pt)
- kDone_Verb, //!< iter.next returns 0 points
+ kDone_Verb //!< iter.next returns 0 points
};
/** Iterate through all of the segments (lines, quadratics, cubics) of
@@ -839,12 +829,6 @@ public:
return this->doNext(pts);
}
- /**
- * Return the weight for the current conic. Only valid if the current
- * segment return by next() was a conic.
- */
- SkScalar conicWeight() const { return *fConicWeights; }
-
/** If next() returns kLine_Verb, then this query returns true if the
line was the result of a close() command (i.e. the end point is the
initial moveto for this contour). If next() returned a different
@@ -864,7 +848,6 @@ public:
const SkPoint* fPts;
const uint8_t* fVerbs;
const uint8_t* fVerbStop;
- const SkScalar* fConicWeights;
SkPoint fMoveTo;
SkPoint fLastPt;
SkBool8 fForceClose;
@@ -896,13 +879,10 @@ public:
*/
Verb next(SkPoint pts[4]);
- SkScalar conicWeight() const { return *fConicWeights; }
-
private:
const SkPoint* fPts;
const uint8_t* fVerbs;
const uint8_t* fVerbStop;
- const SkScalar* fConicWeights;
SkPoint fMoveTo;
SkPoint fLastPt;
};
@@ -942,7 +922,7 @@ private:
kIsOval_SerializationShift = 24, // requires 1 bit
kConvexity_SerializationShift = 16, // requires 2 bits
kFillType_SerializationShift = 8, // requires 2 bits
- kSegmentMask_SerializationShift = 0 // requires 4 bits
+ kSegmentMask_SerializationShift = 0 // requires 3 bits
};
#if SK_DEBUG_PATH_REF