8000 Caching the results of Transform.transform_path for non-affine transforms by pelson · Pull Request #723 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Caching the results of Transform.transform_path for non-affine transforms #723

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

Merged
merged 9 commits into from
Jun 8, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improved comments.
  • Loading branch information
Phil Elson authored and pelson committed Jun 7, 2012
commit c898bdf8d9a989947a307ba61c7eddf2fc8dc709
14 changes: 8 additions & 6 deletions lib/matplotlib/transforms. 9BEB py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ def _invalidate_internal(self, value, invalidating_node):
stack calling each TransformNode's _invalidate_internal method.
"""
# determine if this call will be an extension to the invalidation
# status if not, then a shortcut means that we needn't invoke an
# invalidation up the transform stack
# status. If not, then a shortcut means that we needn't invoke an
# invalidation up the transform stack as it will already have been
# invalidated.

# N.B This makes the invalidation sticky, once a transform has been
# invalidated as NON_AFFINE too, then it is always NON_AFFINE invalid,
# even when triggered with a AFFINE_ONLY invalidation. This will not
# be experienced, as in most cases the invalidation will by AFFINE_ONLY
# anyway.
# invalidated as NON_AFFINE, then it will always be invalidated as
# NON_AFFINE even when triggered with a AFFINE_ONLY invalidation.
# In most cases this is not a problem (i.e. for interactive panning and
# zooming) and the only side effect will be on performance.
status_changed = self._invalid < value

if self.pass_through or status_changed:
Expand Down
0