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

Update clipping rects in ui_layout_system #16732

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

Objective

Perform UI clipping updates during the walk to update the rest of the layout properties.

Solution

  • Removed update_clipping_system and renamed the update module to update_target_cameras.
  • Migrated the queries and clipping update logic from update_clipping_systems to the update_uinode_geometry_recursive function in the layout module.
  • Nodes with Display::None set and their descendants don't need a full update, so added a second function to layout called hide_uinodes_recursive that just walks down the tree and sets the node sizes to zero.

@ickshonpe
Copy link
Contributor Author

ickshonpe commented Dec 9, 2024

I'll do some benchmarks a bit later this evening. Typically it seems to only be a ~10% improvement overall but something like a modal UI with a very deep tree that uses Display::None to hide the inactive elements you would see very large improvements.

@alice-i-cecile alice-i-cecile added C-Performance A change motivated by improving speed, memory usage or compile times A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants