Skip to content

Commit a3e9df3

Browse files
authored
[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
1 parent ac9f68b commit a3e9df3

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

engine/src/flutter/impeller/geometry/round_superellipse_param.cc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ RoundSuperellipseParam::Octant ComputeOctant(Point center,
164164
.se_n = n,
165165
.se_max_theta = asin(sin_thetaJ),
166166

167-
.ratio = ratio,
168-
169167
.circle_start = pointJ,
170168
.circle_center = circle_center,
171169
.circle_max_angle = circle_max_angle,
@@ -318,23 +316,4 @@ bool RoundSuperellipseParam::Contains(const Point& point) const {
318316
CornerContains(bottom_left, point) && CornerContains(top_left, point);
319317
}
320318

321-
void RoundSuperellipseParam::SuperellipseBezierArc(
322-
Point* output,
323-
const RoundSuperellipseParam::Octant& param) {
324-
Point start = {param.se_center.x, param.edge_mid.y};
325-
const Point& end = param.circle_start;
326-
constexpr Point start_tangent = {1, 0};
327-
Point circle_start_vector = param.circle_start - param.circle_center;
328-
Point end_tangent =
329-
Point{-circle_start_vector.y, circle_start_vector.x}.Normalize();
330-
331-
Scalar start_factor = LerpPrecomputedVariable(0, param.ratio);
332-
Scalar end_factor = LerpPrecomputedVariable(1, param.ratio);
333-
334-
output[0] = start;
335-
output[1] = start + start_tangent * start_factor * param.se_a;
336-
output[2] = end + end_tangent * end_factor * param.se_a;
337-
output[3] = end;
338-
}
339-
340319
} // namespace impeller

engine/src/flutter/impeller/geometry/round_superellipse_param.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ struct RoundSuperellipseParam {
4545
// used in the curve's parametric equation.
4646
Scalar se_max_theta;
4747

48-
Scalar ratio;
49-
5048
// The coordinate of the top left end of the circular arc, relative to the
5149
// `offset` point.
5250
Point circle_start;
@@ -123,10 +121,6 @@ struct RoundSuperellipseParam {
123121
// Experiments indicate that the gap is linear with respect to the corner
124122
// radius on that dimension.
125123
static constexpr Scalar kGapFactor = 0.29289321881f; // 1-cos(pi/4)
126-
127-
static void SuperellipseBezierArc(
128-
Point* output,
129-
const RoundSuperellipseParam::Octant& param);
130124
};
131125

132126
} // namespace impeller

0 commit comments

Comments
 (0)