-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revisit the druid <-> druid-shell animation and invalidation interfac…
…e. (#1057) The main issue with the current setup is that animation frames are propagated in the paint callback. This means that they can't invalidate any regions, which in turn means that when druid requests an animation frame, it has to invalidate the whole window just to be sure. So this patch introduces a two-phase paint protocol: first, druid-shell calls prepare_paint, which is allowed to invalidate whatever regions that it wants. Immediately after that, druid-shell calls paint and provides an invalidation region that must be filled. In the discussion on zulip, I proposed having prepare_paint return the region that it wants to be invalidated, but in fact it was simpler to just ask prepare_paint to use the existing invalidation methods. Note that this is a breaking change, in that widgets that previously relied on request_anim_frame doing the invalidation will now need to do their own.
- Loading branch information
Showing
28 changed files
with
684 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.