Skip to content

Cache layout#2145

Merged
xarvic merged 4 commits intolinebender:masterfrom
xarvic:cache_layout
Mar 2, 2022
Merged

Cache layout#2145
xarvic merged 4 commits intolinebender:masterfrom
xarvic:cache_layout

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
Member

@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
Member

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