uint64_t image_cache_threshold () const { return _image_cache_threshold; }
void set_image_cache_threshold (uint64_t);
+ void clear_cache ();
void add (boost::shared_ptr<ARDOUR::AudioSource>, boost::shared_ptr<Entry>);
void use (boost::shared_ptr<ARDOUR::AudioSource>, boost::shared_ptr<Entry>);
{
if (_global_shape != s) {
_global_shape = s;
+ if (images) {
+ images->clear_cache ();
+ }
VisualPropertiesChanged (); /* EMIT SIGNAL */
}
}
{
if (_global_logscaled != yn) {
_global_logscaled = yn;
+ if (images) {
+ images->clear_cache ();
+ }
VisualPropertiesChanged (); /* EMIT SIGNAL */
}
}
}
}
+void
+WaveViewCache::clear_cache ()
+{
+ DEBUG_TRACE (DEBUG::WaveView, "clear cache\n");
+ const uint64_t image_cache_threshold = _image_cache_threshold;
+ _image_cache_threshold = 0;
+ cache_flush ();
+ _image_cache_threshold = image_cache_threshold;
+}
+
void
WaveViewCache::set_image_cache_threshold (uint64_t sz)
{
- DEBUG_TRACE (DEBUG::WaveView, string_compose ("new image cache size \n", sz));
+ DEBUG_TRACE (DEBUG::WaveView, string_compose ("new image cache size %1\n", sz));
_image_cache_threshold = sz;
cache_flush ();
}