Skip to content

Conversation

@flar
Copy link
Contributor

@flar flar commented Feb 27, 2025

Mutator types and MutatorsStack will now use DisplayList/Impeller geometry objects.

@github-actions github-actions bot added platform-android Android applications specifically platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. platform-fuchsia Fuchsia code specifically team-ios Owned by iOS platform team labels Feb 27, 2025
@flar flar force-pushed the mutators-migrate-to-dl-geometry branch from 7514084 to e4c4add Compare February 27, 2025 23:16
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.

Approach LGTM. I'll look more closely tomorrow.

const SkMatrix& matrix = (*iter)->GetMatrix();
SkScalar matrix_array[9];
matrix.get9(matrix_array);
case MutatorType::kTransform: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Note to self, investigate if we need to drop to a 3x3 here or if we could use a full 4x4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Android class being populated was a 3x3-based class. If they have a more accurate class we can consider adopting that, in a separate issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed as #164596


std::vector<std::shared_ptr<Mutator>>::const_iterator iter =
mutators_stack.Begin();
while (iter != mutators_stack.End()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

A note for @gmackall , we should refactor this logic to share the mutator encoding between the two platform view JNI methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this and the 4x4 vs 3x3 issue be combined or separate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll leave this to @gmackall to file if necessary.

ViewMutators mutators;
SkMatrix total_transform = SkMatrix::I();
SkMatrix transform_accumulator = SkMatrix::I();
flutter::DlMatrix total_transform;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if the fuchsia code is going to have a problem with this because we've ifdef'd out impeller? But if it seems to be compiling I dunno.

FYI @zanderso

Copy link
Member

Choose a reason for hiding this comment

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

The external view embedder unit tests are failing on Fuchsia...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only thing I found wrong with them is that I was using slightly different math to convert the int alphas to float alphas. I think I fixed that in the last 2 commits.

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.

LGTM

@flar
Copy link
Contributor Author

flar commented Mar 4, 2025

I have found the source of the iOS golden failures. The code in the platform view tries to turn an rrect clip into a path, but it botches the job - you can look at it in the "old code", it doesn't have any of the typical "magic bezier scale factors" that should be there, it just repeats the corner and end points as "control points".

My new code was passing the work off to an existing RR->Path converter which was doing an accurate job and that caused problems.

I think I'm just going to do a straight translation of the old code into the new data structures and leave "fixing the rrect conversion" to another issue to be fixed independently (see #164595).

@flar
Copy link
Contributor Author

flar commented Mar 5, 2025

@jonahwilliams this should be good to go now, with no golden file changes needed.

@jonahwilliams
Copy link
Contributor

Will take another look tomorrow. lets let #164525 land first, it should have only a small impact on this PR but will cause conflits one way or the other.

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.

LGTM!

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

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #164258 at sha 1156eb5

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Mar 5, 2025
@flar
Copy link
Contributor Author

flar commented Mar 5, 2025

The latest golden diffs are not intentional, I believe the issue is that the path being iterated is a converted path from the original SkPath rather than the raw path. The converted path has an approximation of the curves that doesn't match. I have an idea to enable simpler path iteration via DlPath that will isolate the caller from knowing which is the authoritative version of the path without having to embed knowledge of SkPath.

@flar
Copy link
Contributor Author

flar commented Mar 5, 2025

The golden issue is clipping to an Oval which is handled with high precision code in the Impeller rendering, but passed along to the android platform as an approximated path. For now, we will pull out the simplified/reduced path types in the Android embedder code, but we really should handle this at a higher level (see #164666)

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.

LGTM

@flutter-dashboard
Copy link

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

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #164258 at sha 0e5fab0

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 6, 2025
@flar
Copy link
Contributor Author

flar commented Mar 6, 2025

A more general solution to the issue found with the oval clips is being pursued in #164693

Since that other PR has a risk of causing tiny golden diffs throughout the many layers of testing, it is being pursued as its own PR to have its own life cycle of potential golden image disruption.

@auto-submit auto-submit bot added this pull request to the merge queue Mar 6, 2025
Merged via the queue into flutter:master with commit 66e910d Mar 6, 2025
177 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 6, 2025
flar added a commit to flar/flutter that referenced this pull request Mar 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Mar 7, 2025
flutter/flutter@321fbc0...6b93cf9

2025-03-07 [email protected] Roll Skia from 32c1931117b8 to cbc7e99d6c2f (1 revision) (flutter/flutter#164788)
2025-03-07 [email protected] Roll Packages from fc9d5ca to 4c5a7ed (4 revisions) (flutter/flutter#164785)
2025-03-07 [email protected] Roll Skia from 79f8af105a61 to 32c1931117b8 (1 revision) (flutter/flutter#164782)
2025-03-07 [email protected] Roll Fuchsia Linux SDK from fhm5z889sA5T1AQao... to ixl5bKWCqsRiYGvps... (flutter/flutter#164780)
2025-03-07 [email protected] Roll Skia from 181d81920670 to 79f8af105a61 (1 revision) (flutter/flutter#164770)
2025-03-07 [email protected] Roll Skia from cc74d34e7e68 to 181d81920670 (1 revision) (flutter/flutter#164766)
2025-03-07 [email protected] Clip layers reduce rrects and paths to simpler shapes when possible (flutter/flutter#164693)
2025-03-07 [email protected] [Impeller] test empty snapshot and allocation failure. (flutter/flutter#164668)
2025-03-07 [email protected] Roll Skia from 263308ea4386 to cc74d34e7e68 (2 revisions) (flutter/flutter#164746)
2025-03-06 [email protected] Adds aria-controls support (flutter/flutter#163894)
2025-03-06 [email protected] Migrate Mutators to DisplayList/Impeller geometry (flutter/flutter#164258)
2025-03-06 [email protected] Add lldb init file (flutter/flutter#164344)
2025-03-06 [email protected] Use separate artifacts for arm64 and x64 versions of gen_snapshot on Apple platforms (flutter/flutter#164419)
2025-03-06 [email protected] Roll Skia from ccd8cc23aa94 to 263308ea4386 (1 revision) (flutter/flutter#164728)
2025-03-06 [email protected] [hcpp] Add tests for transform mutator (flutter/flutter#164664)
2025-03-06 [email protected] Roll pub packages (flutter/flutter#164721)
2025-03-06 [email protected] Roll Packages from abba683 to fc9d5ca (3 revisions) (flutter/flutter#164714)
2025-03-06 [email protected] Roll pub packages (flutter/flutter#164713)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
flutter/flutter@321fbc0...6b93cf9

2025-03-07 [email protected] Roll Skia from 32c1931117b8 to cbc7e99d6c2f (1 revision) (flutter/flutter#164788)
2025-03-07 [email protected] Roll Packages from fc9d5ca to 4c5a7ed (4 revisions) (flutter/flutter#164785)
2025-03-07 [email protected] Roll Skia from 79f8af105a61 to 32c1931117b8 (1 revision) (flutter/flutter#164782)
2025-03-07 [email protected] Roll Fuchsia Linux SDK from fhm5z889sA5T1AQao... to ixl5bKWCqsRiYGvps... (flutter/flutter#164780)
2025-03-07 [email protected] Roll Skia from 181d81920670 to 79f8af105a61 (1 revision) (flutter/flutter#164770)
2025-03-07 [email protected] Roll Skia from cc74d34e7e68 to 181d81920670 (1 revision) (flutter/flutter#164766)
2025-03-07 [email protected] Clip layers reduce rrects and paths to simpler shapes when possible (flutter/flutter#164693)
2025-03-07 [email protected] [Impeller] test empty snapshot and allocation failure. (flutter/flutter#164668)
2025-03-07 [email protected] Roll Skia from 263308ea4386 to cc74d34e7e68 (2 revisions) (flutter/flutter#164746)
2025-03-06 [email protected] Adds aria-controls support (flutter/flutter#163894)
2025-03-06 [email protected] Migrate Mutators to DisplayList/Impeller geometry (flutter/flutter#164258)
2025-03-06 [email protected] Add lldb init file (flutter/flutter#164344)
2025-03-06 [email protected] Use separate artifacts for arm64 and x64 versions of gen_snapshot on Apple platforms (flutter/flutter#164419)
2025-03-06 [email protected] Roll Skia from ccd8cc23aa94 to 263308ea4386 (1 revision) (flutter/flutter#164728)
2025-03-06 [email protected] [hcpp] Add tests for transform mutator (flutter/flutter#164664)
2025-03-06 [email protected] Roll pub packages (flutter/flutter#164721)
2025-03-06 [email protected] Roll Packages from abba683 to fc9d5ca (3 revisions) (flutter/flutter#164714)
2025-03-06 [email protected] Roll pub packages (flutter/flutter#164713)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
flutter/flutter@321fbc0...6b93cf9

2025-03-07 [email protected] Roll Skia from 32c1931117b8 to cbc7e99d6c2f (1 revision) (flutter/flutter#164788)
2025-03-07 [email protected] Roll Packages from fc9d5ca to 4c5a7ed (4 revisions) (flutter/flutter#164785)
2025-03-07 [email protected] Roll Skia from 79f8af105a61 to 32c1931117b8 (1 revision) (flutter/flutter#164782)
2025-03-07 [email protected] Roll Fuchsia Linux SDK from fhm5z889sA5T1AQao... to ixl5bKWCqsRiYGvps... (flutter/flutter#164780)
2025-03-07 [email protected] Roll Skia from 181d81920670 to 79f8af105a61 (1 revision) (flutter/flutter#164770)
2025-03-07 [email protected] Roll Skia from cc74d34e7e68 to 181d81920670 (1 revision) (flutter/flutter#164766)
2025-03-07 [email protected] Clip layers reduce rrects and paths to simpler shapes when possible (flutter/flutter#164693)
2025-03-07 [email protected] [Impeller] test empty snapshot and allocation failure. (flutter/flutter#164668)
2025-03-07 [email protected] Roll Skia from 263308ea4386 to cc74d34e7e68 (2 revisions) (flutter/flutter#164746)
2025-03-06 [email protected] Adds aria-controls support (flutter/flutter#163894)
2025-03-06 [email protected] Migrate Mutators to DisplayList/Impeller geometry (flutter/flutter#164258)
2025-03-06 [email protected] Add lldb init file (flutter/flutter#164344)
2025-03-06 [email protected] Use separate artifacts for arm64 and x64 versions of gen_snapshot on Apple platforms (flutter/flutter#164419)
2025-03-06 [email protected] Roll Skia from ccd8cc23aa94 to 263308ea4386 (1 revision) (flutter/flutter#164728)
2025-03-06 [email protected] [hcpp] Add tests for transform mutator (flutter/flutter#164664)
2025-03-06 [email protected] Roll pub packages (flutter/flutter#164721)
2025-03-06 [email protected] Roll Packages from abba683 to fc9d5ca (3 revisions) (flutter/flutter#164714)
2025-03-06 [email protected] Roll pub packages (flutter/flutter#164713)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-android Android applications specifically platform-fuchsia Fuchsia code specifically platform-ios iOS applications specifically team-ios Owned by iOS platform team will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants