-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Conversation
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. |
There was a problem hiding this 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.
There was a problem hiding this 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, |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
impeller/entity/save_layer_utils.cc
Outdated
} | ||
|
||
return intersection; | ||
return intersection.value(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return intersect_rect?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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().
There was a problem hiding this comment.
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🤞
…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
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.