8#ifndef skgpu_tessellate_LinearTolerances_DEFINED
9#define skgpu_tessellate_LinearTolerances_DEFINED
52 int maxRadialSegmentsInStroke =
55 int maxParametricSegmentsInStroke =
57 SkASSERT(maxParametricSegmentsInStroke >= 1);
74 int maxEdgesInStroke = maxRadialSegmentsInStroke + maxParametricSegmentsInStroke;
81 return fEdgesInJoins + maxEdgesInStroke;
86 fNumParametricSegments_p4 = n4;
90 float approxDeviceStrokeRadius;
91 if (strokeParams.
fRadius == 0.f) {
93 approxDeviceStrokeRadius = 0.5f;
96 approxDeviceStrokeRadius = strokeParams.
fRadius * maxScale;
102 if (strokeParams.
fJoinType < 0.f && fNumRadialSegmentsPerRadian > 0.f) {
110 if (tolerances.fNumParametricSegments_p4 > fNumParametricSegments_p4) {
111 fNumParametricSegments_p4 = tolerances.fNumParametricSegments_p4;
113 if (tolerances.fNumRadialSegmentsPerRadian > fNumRadialSegmentsPerRadian) {
114 fNumRadialSegmentsPerRadian = tolerances.fNumRadialSegmentsPerRadian;
116 if (tolerances.fEdgesInJoins > fEdgesInJoins) {
117 fEdgesInJoins = tolerances.fEdgesInJoins;
123 float fNumParametricSegments_p4 = 1.f;
131 float fNumRadialSegmentsPerRadian = 0.f;
137 int fEdgesInJoins = 0;
#define SkScalarCeilToInt(x)
float numParametricSegments_p4() const
void setStroke(const StrokeParams &strokeParams, float maxScale)
int requiredStrokeEdges() const
float numRadialSegmentsPerRadian() const
void setParametricSegments(float n4)
int requiredResolveLevel() const
int numEdgesInJoins() const
void accumulate(const LinearTolerances &tolerances)
static float max(float r, float g, float b)
float CalcNumRadialSegmentsPerRadian(float approxDevStrokeRadius)
constexpr int NumFixedEdgesInJoin(SkPaint::Join joinType)