static const int MAX_POINTS_PER_CURVE = 1 << 10;
static const SkScalar gMinCurveTol = 0.0001f;
-uint32_t GrPathUtils::quadraticPointCount(const SkPoint points[],
- SkScalar tol) {
+uint32_t GrPathUtils::quadraticPointCount(const SkPoint points[], SkScalar tol) {
if (tol < gMinCurveTol) {
tol = gMinCurveTol;
}
return a + b;
}
-int GrPathUtils::worstCasePointCount(const SkPath& path, int* subpaths,
- SkScalar tol) {
+int GrPathUtils::worstCasePointCount(const SkPath& path, int* subpaths, SkScalar tol) {
if (tol < gMinCurveTol) {
tol = gMinCurveTol;
}
case SkPath::kConic_Verb: {
SkScalar weight = iter.conicWeight();
SkAutoConicToQuads converter;
- const SkPoint* quadPts = converter.computeQuads(pts, weight, 0.25f);
+ const SkPoint* quadPts = converter.computeQuads(pts, weight, tol);
for (int i = 0; i < converter.countQuads(); ++i) {
pointCount += quadraticPointCount(quadPts + 2*i, tol);
}