Thanks to visit codestin.com
Credit goes to github.com

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

[Impeller] Keep track of stencil coverage; don't render unused clips #35966

Merged
merged 6 commits into from
Sep 8, 2022

Conversation

bdero
Copy link
Member

@bdero bdero commented Sep 7, 2022

This should resolve flutter/flutter#110442.

Mainly, this gets rid of excess clips which don't make an on-screen difference.

I also wrote this change to stash the appended clip and lazily render it, but this stencil coverage diff alone is turning out to be enough.

WIP because I haven't thoroughly tested it against Wondrous and Gallery yet.

@bdero bdero self-assigned this Sep 7, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

@bdero bdero changed the title WIP: [Impeller] Keep track of stencil coverage; don't render unused clips [Impeller] Keep track of stencil coverage; don't render unused clips Sep 7, 2022
@@ -1433,7 +1433,7 @@ TEST_P(EntityTest, SolidFillShouldRenderIsCorrect) {
{
auto fill = std::make_shared<SolidColorContents>();
fill->SetColor(Color::CornflowerBlue());
ASSERT_FALSE(fill->ShouldRender(Entity{}, {100, 100}));
ASSERT_FALSE(fill->ShouldRender(Entity{}, Rect::MakeSize(Size{100, 100})));
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a test or two for the new API?

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. Added test coverage for the new ShouldRender behavior.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

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 needs tests
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Impeller] applications that render significant offscreen contents are slower under impeller than they are under skia
2 participants