Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@flar
Copy link
Contributor

@flar flar commented Jul 17, 2024

Converts several AIKS golden tests to use DisplayList as the mechanism.

In order to convert some of the tests, new factory methods were added to DlColor and tested with new unit tests (an earlier golden test conversion PR had a version of this as well).

Also, a new DisplayList record op was created for ClipOval to handle the AIKS clipping golden tests, but this new recording op is not used from Flutter ui code (no plumbing to call it from lib/ui/painting or to convert any other DisplayList call to use the new record). An earlier attempt to add the new recording op caused a large number of golden changes upstream so this version will only be used for internal tests and support to use it from apps will follow in more targeted PRs to better manage golden changes. This PR should not result in any changes to goldens outside of internal engine tests.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, LGTM!

@flar
Copy link
Contributor Author

flar commented Jul 17, 2024

Assertion that this cannot affect anything outside of the new engine tests in its current form:

  • No changes to lib/ui at all
  • Only changes to display_list/dl_builder.[h,cc] are to add the new call and encode it into the buffer

Combined those 2 assertions mean that Dart code cannot use this new mechanism (yet).

See flutter/flutter#151850

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #53969 at sha dcfba85

@flar
Copy link
Contributor Author

flar commented Jul 17, 2024

I believe the differences in the round rect goldens are due to minor math differences between:

  • impeller::PathBuilder::AddRoundedRect
  • SkPath::RRect

I'm thinking that the test should use Builder::DrawRRect()instead ofBuilder::DrawPath(SkPath)`. AIKS Canvas didn't have a non-uniform-radii DrawRRect, but Builder does.

@jonahwilliams ?

(I just pushed a change to use DrawRRect in that test instead of costructing an SkPath)

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #53969 at sha c9b5e7f

@jonahwilliams
Copy link
Contributor

I'm thinking that the test should use Builder::DrawRRect()instead ofBuilder::DrawPath(SkPath)`. AIKS Canvas didn't have a non-uniform-radii DrawRRect, but Builder does.

That seems reasonable to me!

@flar
Copy link
Contributor Author

flar commented Jul 17, 2024

I'm checking with @jiahaog to see if I should dry run this through the internal "mass golden test changes" tool first just to verify that it won't affect anything...

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 17, 2024
@auto-submit auto-submit bot merged commit 00f0f6b into flutter:main Jul 17, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants