Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] simplify render target size rounding up heuristics. #57043

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Dec 7, 2024

Remove the over-engineered "slide around round up" herusistic for the same heuristic used by the image filters: if the coverage size is within 30% of the cull rect size, just use the cull rect size.

This stabilizes allocations for the new android slide in page transition, but in a less complicated way than the old herustic.

@jonahwilliams jonahwilliams changed the title simplify rounding up heuristics. [Impeller] simplify render target size rounding up heuristics. Dec 7, 2024
@jonahwilliams jonahwilliams marked this pull request as ready for review December 9, 2024 18:20
@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 #57043 at sha b667d59

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

This looks good to me. It's a small PR I'd like to get @flar's eyes too if he gets a chance.

Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

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

LGTM, but I think we need to keep the testing near the same levels as before...

(plus 1 nit)

@@ -280,77 +280,18 @@ TEST(SaveLayerUtilsTest,
EXPECT_EQ(coverage.value(), Rect::MakeLTRB(0, 0, 50, 50));
}

TEST(SaveLayerUtilsTest,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are all of these other test cases deleted? I think it's important to verify that we are rounding up in reasonable cases but not in "unreasonable" cases (and though our policy on unreasonable might change over time, not having any test for it means it could change unintentionally)

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a few more test cases that cover one or both of the dimensions being too different for the round up.

}

return intersection;
return intersection.value();
Copy link
Contributor

Choose a reason for hiding this comment

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

return intersect_rect?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we can know we have a value here, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member Author

Choose a reason for hiding this comment

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

we already early returned if it didn't have a value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I had to eyeball it in the diffs, but it looked like it just came from a piece of code that grabbed the value().

Copy link
Member

Choose a reason for hiding this comment

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

The linter should flag it if it ever isn't the case in the future🤞

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 9, 2024
@auto-submit auto-submit bot merged commit 2069db8 into flutter:main Dec 10, 2024
31 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 10, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Dec 10, 2024
…160008)

flutter/engine@4d0e9ac...2069db8

2024-12-10 [email protected] [Impeller] simplify render target
size rounding up heuristics. (flutter/engine#57043)
2024-12-09 [email protected] moved device
buffer to an untracked handle (flutter/engine#57021)
2024-12-09 [email protected] Roll Skia from 14f8f6d984ff to
3a58be4817a8 (3 revisions) (flutter/engine#57073)

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

To file a bug in Flutter:
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
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.

3 participants