summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-04-25 09:48:38 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-04-25 09:48:38 -0400
commitfd7ac62ca5a44f68b6701f21d9296cb19f0ebdc6 (patch)
tree942883f6e3b9b8edfa1618c4a28c8161d65abdc8 /libs
parentd0867e67e32e870f6ecc6f3087024cb27fb44a67 (diff)
don't invalidate image cache for every regionr esize, only region start changes
Diffstat (limited to 'libs')
-rw-r--r--libs/canvas/wave_view.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc
index f39dca7594..ac45c2bc7c 100644
--- a/libs/canvas/wave_view.cc
+++ b/libs/canvas/wave_view.cc
@@ -421,8 +421,17 @@ WaveView::region_resized ()
_pre_change_bounding_box = _bounding_box;
- _region_start = _region->start();
- invalidate_whole_cache ();
+ frameoffset_t s = _region->start();
+
+ if (s != _region_start) {
+ /* if the region start changes, the information we have
+ in the image cache is out of date and not useful
+ since it will fragmented into little pieces. invalidate
+ the cache.
+ */
+ _region_start = _region->start();
+ invalidate_whole_cache ();
+ }
_bounding_box_dirty = true;
compute_bounding_box ();