8#ifndef GrQuadUtils_DEFINED
9#define GrQuadUtils_DEFINED
16enum class GrAA : bool;
124 struct EdgeEquations {
128 void reset(
const EdgeVectors& edgeVectors);
138 int computeDegenerateQuad(
const skvx::float4& signedEdgeDistances,
143 struct OutsetRequest {
151 bool fInsetDegenerate;
152 bool fOutsetDegenerate;
175 void moveAlong(
const EdgeVectors& edgeVectors,
188 EdgeVectors fEdgeVectors;
193 OutsetRequest fOutsetRequest;
194 EdgeEquations fEdgeEquations;
197 bool fVerticesValid =
false;
200 bool fOutsetRequestValid =
false;
202 bool fEdgeEquationsValid =
false;
206 const OutsetRequest& getOutsetRequest(
const skvx::float4& edgeDistances);
207 const EdgeEquations& getEdgeEquations();
211 void adjustVertices(
const skvx::float4& signedEdgeDistances, Vertices* vertices);
214 int adjustDegenerateVertices(
const skvx::float4& signedEdgeDistances,
224 outsetter.
reset(*quad,
nullptr);
225 outsetter.
outset(edgeDistances, quad,
nullptr);
void getEdgeEquations(skvx::float4 *a, skvx::float4 *b, skvx::float4 *c)
void reset(const GrQuad &deviceQuad, const GrQuad *localQuad)
void outset(const skvx::float4 &edgeDistances, GrQuad *deviceOutset, GrQuad *localOutset)
skvx::float4 inset(const skvx::float4 &edgeDistances, GrQuad *deviceInset, GrQuad *localInset)
skvx::float4 getEdgeLengths()
friend int ClipToW0(DrawQuad *, DrawQuad *)
bool WillUseHairline(const GrQuad &quad, GrAAType aaType, GrQuadAAFlags edgeFlags)
bool CropToRect(const SkRect &cropRect, GrAA cropAA, DrawQuad *quad, bool computeLocal)
void ResolveAAType(GrAAType requestedAAType, GrQuadAAFlags requestedEdgeFlags, const GrQuad &quad, GrAAType *outAAType, GrQuadAAFlags *outEdgeFlags)
int ClipToW0(DrawQuad *quad, DrawQuad *extraVertices)
void Outset(const skvx::float4 &edgeDistances, GrQuad *quad)