[Impeller] Tessellation for Bezier curves doesn't look too great when scaled.
TEST_F(EntityTest, BezierCircleScaled) {
Entity entity;
auto path = PathBuilder{}
.MoveTo({97.325, 34.818})
.CubicCurveTo({98.50862885295136, 34.81812293973836},
{99.46822048142015, 33.85863261475589},
{99.46822048142015, 32.67499810206613})
.CubicCurveTo({99.46822048142015, 31.491363589376355},
{98.50862885295136, 30.53187326439389},
{97.32499434685802, 30.531998226542708})
.CubicCurveTo({96.14153655073771, 30.532123170035373},
{95.18222070648729, 31.491540299350355},
{95.18222070648729, 32.67499810206613})
.CubicCurveTo({95.18222070648729, 33.85845590478189},
{96.14153655073771, 34.81787303409686},
{97.32499434685802, 34.81799797758954})
.Close()
.TakePath();
entity.SetPath(path);
entity.SetTransformation(Matrix::MakeScale({20.0, 20.0, 1.0}).Translate({-80, -15, 0}));
entity.SetContents(SolidColorContents::Make(Color::Red()));
ASSERT_TRUE(OpenPlaygroundHere(entity));
}
At the current values for SmoothingApproximation:
If I change SmoothingApproximation.scale to 0.01 it looks much better, but also is more expensive to calculate.
We should probably have this be adaptive so that when people scale into paths they still look good.
@Chinmaygarde @bdero fyi
Right, the approximation is just an arbitrary number right now. Will have to be adaptive or precomputed for known paths.
Update: We have some support for adaptive subdivision now but it is not uniformly applied. The next step is to do a pass for all geometry types.
Closing this since https://github.com/flutter/engine/pull/38497 Fix this ^_^
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.