8#ifndef GrAAConvexTessellator_DEFINED
9#define GrAAConvexTessellator_DEFINED
41 , fMiterLimit(miterLimit) {
57#if GR_AA_CONVEX_TESSELLATOR_VIZ
67 class CandidateVerts {
75 const SkPoint& firstPoint()
const {
return fPts[0].fPt; }
78 int originatingIdx(
int index)
const {
return fPts[
index].fOriginatingIdx; }
80 bool needsToBeNew(
int index)
const {
return fPts[
index].fNeedsToBeNew; }
82 int addNewPt(
const SkPoint& newPt,
int originatingIdx,
int origEdge,
bool needsToBeNew) {
83 struct PointData* pt =
fPts.append();
85 pt->fOrigEdgeId = origEdge;
86 pt->fOriginatingIdx = originatingIdx;
87 pt->fNeedsToBeNew = needsToBeNew;
88 return fPts.size() - 1;
91 int fuseWithPrior(
int origEdgeId) {
92 fPts.back().fOrigEdgeId = origEdgeId;
93 fPts.back().fOriginatingIdx = -1;
94 fPts.back().fNeedsToBeNew =
true;
95 return fPts.size() - 1;
99 fPts[0].fOriginatingIdx = -1;
100 fPts[0].fNeedsToBeNew =
true;
105 if (
fPts.size() > 1) {
109 fPts[0].fOriginatingIdx = -1;
110 fPts[0].fNeedsToBeNew =
true;
134 void addIdx(
int index,
int origEdgeId) {
135 struct PointData* pt =
fPts.append();
137 pt->fOrigEdgeId = origEdgeId;
141 void makeOriginalRing() {
142 for (
int i = 0;
i <
fPts.size(); ++
i) {
154 int origEdgeID(
int index)
const {
return fPts[
index].fOrigEdgeId; }
157 #if GR_AA_CONVEX_TESSELLATOR_VIZ
184 kIndeterminate_CurveState,
189 bool movable(
int index)
const {
return fMovable[
index]; }
196 void popFirstPtShuffle();
200 void addTri(
int i0,
int i1,
int i2);
202 void reservePts(
int count) {
210 bool computePtAlongBisector(
int startIdx,
const SkPoint& bisector,
214 void lineTo(
const SkPoint&
p, CurveState curve);
218 void quadTo(
const SkPoint pts[3]);
226 void terminate(
const Ring& lastRing);
230 void computeBisectors();
231 void computeNormals();
233 void fanRing(
const Ring& ring);
235 Ring* getNextRing(Ring* lastRing);
240 bool createInsetRings(Ring& previousRing,
SkScalar initialDepth,
SkScalar initialCoverage,
243 bool createInsetRing(
const Ring& lastRing, Ring* nextRing,
245 SkScalar targetCoverage,
bool forceNew);
247 void validate()
const;
270#if GR_AA_CONVEX_TESSELLATOR_VIZ
276 CandidateVerts fCandidateVerts;
SkStrokeRec::Style fStyle
static const int strokeWidth
static const SkScalar kAntialiasingRadius
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
bool tessellate(const SkMatrix &m, const SkPath &path)
const SkPoint & lastPoint() const
SkScalar coverage(int index) const
GrAAConvexTessellator(SkStrokeRec::Style style=SkStrokeRec::kFill_Style, SkScalar strokeWidth=-1.0f, SkPaint::Join join=SkPaint::Join::kBevel_Join, SkScalar miterLimit=0.0f)
SkPointPriv::Side side() const
const SkPoint & point(int index) const
int index(int index) const
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static TessellatorLibtess tess
static SkString join(const CommandLineFlags::StringArray &)