Animate overlay artists through blitting #1631
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a blit manager to manage overlay artists
The blit manager was modified from this example: https://matplotlib.org/stable/users/explain/animations/blitting.html
It is being used to automatically manage things like updating the background image, updating the blit artists, etc.
We are now using it to manage the overlay artists, including drawing them and removing them.
Blitting the overlay artists provides a significant performance boost when we modify parameters that only require the overlay artists to be redrawn. Especially when we have a high resolution in any of the views (other than raw, which doesn't have a resolution).
For example, the sliders for the Laue parameters are significantly more interactive now. And this provides a great opportunity for us to boost performance for the pressure sliders too.