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

Cache layout #2145

Merged
merged 4 commits into from
Mar 2, 2022
Merged

Cache layout #2145

merged 4 commits into from
Mar 2, 2022

Conversation

xarvic
Copy link
Collaborator

@xarvic xarvic commented Feb 24, 2022

This PR changes the implementation of layout for widgets with multiple children. Now these widgets only call layout on children which need a layout call. Either because WidgetPod::requested_layout is set or because their BoxConstrains have changed.

Copy link
Collaborator

@jneem jneem left a comment

Choose a reason for hiding this comment

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

Cool!

@jpochyla
Copy link
Contributor

Could this be used to avoid the full repaint currently performed after each layout pass?

@jneem
Copy link
Collaborator

jneem commented Feb 27, 2022

In principle, yes, I think so. It would need some more work though; it won't just happen automatically from this.

@xarvic
Copy link
Collaborator Author

xarvic commented Feb 27, 2022

The problem is this line.
But it should be possible get the old and new paint rects of every widget which was moved or resized during layout.

@xarvic xarvic merged commit dda0073 into linebender:master Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants