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

Conversation

@bdero
Copy link
Member

@bdero bdero commented Jun 23, 2023

Similar to Metal, have the DL cull entities early that lie entirely outside the surface texture.

@bdero bdero requested review from flar and jonahwilliams June 23, 2023 18:15
@bdero bdero self-assigned this Jun 23, 2023
@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.

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.

LGTM, what are your plans for testing?

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

I don't really think there are reasonable ways to test this sort of thing, besides rendering correctness and performance.

@gaaclarke
Copy link
Member

I don't really think there are reasonable ways to test this sort of thing, besides rendering correctness and performance.

Neither of those things would show up if this was broken here. I plan on writing a test that uses it, we can consider that coverage at least.

@jonahwilliams
Copy link
Contributor

You could stand up one of the platform view performance integration tests on Impeller/Android. I think its Skia only right now.

@jonahwilliams
Copy link
Contributor

Yes that's why we have a devicelab


impeller::DlDispatcher impeller_dispatcher;
display_list->Dispatch(impeller_dispatcher);
display_list->Dispatch(
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: need to do the SkConversions like in the metal surface.

@flar
Copy link
Contributor

flar commented Jun 23, 2023

Yeah, I don't see a good way to test this without instrumenting the code being tested. Does the Heisenberg Uncertainty Principle apply here?

@flar
Copy link
Contributor

flar commented Jun 23, 2023

You can't test that the culling is happening, but you can test if the culling causes an error maybe. Draw a scene that has a mix of in-bounds, out-of-bounds, and on-the-bounds rendering ops and then make it a golden test. It would have no idea if the out-of-bounds ops got culled from that, but it would test for unintended consequences.

Could we somehow create a franken-render-target that was large but reported a small bounds and then see if the primitives were rendered outside the bounds?

@jonahwilliams
Copy link
Contributor

We have benchmarks that are not currently configured to run Impeller, but could. These would show a performance improvement on this change. Benchmark improvements count as tests

@bdero
Copy link
Member Author

bdero commented Jun 23, 2023

Looking into android_view_scroll_perf for this at the moment.

bdero added a commit to flutter/flutter that referenced this pull request Jun 24, 2023
@bdero bdero merged commit a9f446e into flutter:main Jun 24, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants