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

Add raster caching to smooth pan/zoom #1195

Merged
merged 1 commit into from
Nov 16, 2018

Conversation

pelson
Copy link
Member

@pelson pelson commented Nov 16, 2018

Rationale

Allow SlippyImageArtist to cache images to be re-drawn while interacting with the figure.
This makes slow rendering images (such as those going to the net, or images that need reprojecting) not lock up the interactivity of pan/zoom and to only trigger the re-fetch once we have finished interacting.

Note: Implementation from @kaedonkers. I've just lifted a commit from #1192 (@dkillick's PR).

Implications

Adds a cache to SlippyImageArtist that is invalidated each full redraw request.

@pelson
Copy link
Member Author

pelson commented Nov 16, 2018

Since I've only put this up as a reviewer of the larger #1192, I'm happy to merge this myself.

@pelson pelson merged commit e4b8d5c into SciTools:master Nov 16, 2018
@pelson pelson deleted the slippy_image_artist_pan branch November 16, 2018 05:18
@pelson pelson mentioned this pull request Nov 16, 2018

def on_press(self, event=None):
self.user_is_interacting = True
self.stale = True
Copy link
Member

Choose a reason for hiding this comment

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

Why does a mousedown trigger a redraw?

Copy link
Member Author

Choose a reason for hiding this comment

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

You know, that is a fine question that I didn't think to ask.
I can't see any benefit to it either.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants