[Engine] Remove dead code for RoundedSuperellipse (#164163)

Remove dead code that occurred during development and I forgot to
remove.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This commit is contained in:
Tong Mu 2025-02-26 01:59:05 -08:00 committed by GitHub
parent ac9f68b12d
commit a3e9df35aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 27 deletions

View File

@ -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

View File

@ -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