diff --git a/engine/src/flutter/impeller/geometry/round_superellipse_param.cc b/engine/src/flutter/impeller/geometry/round_superellipse_param.cc index 26c5e84c26..243040813c 100644 --- a/engine/src/flutter/impeller/geometry/round_superellipse_param.cc +++ b/engine/src/flutter/impeller/geometry/round_superellipse_param.cc @@ -164,8 +164,6 @@ RoundSuperellipseParam::Octant ComputeOctant(Point center, .se_n = n, .se_max_theta = asin(sin_thetaJ), - .ratio = ratio, - .circle_start = pointJ, .circle_center = circle_center, .circle_max_angle = circle_max_angle, @@ -318,23 +316,4 @@ bool RoundSuperellipseParam::Contains(const Point& point) const { CornerContains(bottom_left, point) && CornerContains(top_left, point); } -void RoundSuperellipseParam::SuperellipseBezierArc( - Point* output, - const RoundSuperellipseParam::Octant& param) { - Point start = {param.se_center.x, param.edge_mid.y}; - const Point& end = param.circle_start; - constexpr Point start_tangent = {1, 0}; - Point circle_start_vector = param.circle_start - param.circle_center; - Point end_tangent = - Point{-circle_start_vector.y, circle_start_vector.x}.Normalize(); - - Scalar start_factor = LerpPrecomputedVariable(0, param.ratio); - Scalar end_factor = LerpPrecomputedVariable(1, param.ratio); - - output[0] = start; - output[1] = start + start_tangent * start_factor * param.se_a; - output[2] = end + end_tangent * end_factor * param.se_a; - output[3] = end; -} - } // namespace impeller diff --git a/engine/src/flutter/impeller/geometry/round_superellipse_param.h b/engine/src/flutter/impeller/geometry/round_superellipse_param.h index a4b70b869d..6318255588 100644 --- a/engine/src/flutter/impeller/geometry/round_superellipse_param.h +++ b/engine/src/flutter/impeller/geometry/round_superellipse_param.h @@ -45,8 +45,6 @@ struct RoundSuperellipseParam { // used in the curve's parametric equation. Scalar se_max_theta; - Scalar ratio; - // The coordinate of the top left end of the circular arc, relative to the // `offset` point. Point circle_start; @@ -123,10 +121,6 @@ struct RoundSuperellipseParam { // Experiments indicate that the gap is linear with respect to the corner // radius on that dimension. static constexpr Scalar kGapFactor = 0.29289321881f; // 1-cos(pi/4) - - static void SuperellipseBezierArc( - Point* output, - const RoundSuperellipseParam::Octant& param); }; } // namespace impeller