, always_get_image_in_thread (false)
, rendered (false)
{
+ if (!images) {
+ images = new WaveViewCache;
+ }
+
VisualPropertiesChanged.connect_same_thread (invalidation_connection, boost::bind (&WaveView::handle_visual_property_change, this));
ClipLevelChanged.connect_same_thread (invalidation_connection, boost::bind (&WaveView::handle_clip_level_change, this));
, always_get_image_in_thread (false)
, rendered (false)
{
+ if (!images) {
+ images = new WaveViewCache;
+ }
+
VisualPropertiesChanged.connect_same_thread (invalidation_connection, boost::bind (&WaveView::handle_visual_property_change, this));
ClipLevelChanged.connect_same_thread (invalidation_connection, boost::bind (&WaveView::handle_clip_level_change, this));
req->start,
req->end,
req->image));
- if (!images) {
- images = new WaveViewCache;
- }
-
images->add (_region->audio_source (_channel), ret);
/* consolidate cache first (removes fully-contained
current_request.reset ();
}
+void
+WaveView::set_image_cache_size (uint64_t sz)
+{
+ if (!images) {
+ images = new WaveViewCache;
+ }
+
+ images->set_image_cache_threshold (sz);
+}
+
/*-------------------------------------------------*/
void
for (CacheLine::iterator c = cl.begin(); c != cl.end(); ++c) {
if (*c == le.second) {
+
+ DEBUG_TRACE (DEBUG::WaveView, string_compose ("Removing cache line entry for %1\n", x->first->name()));
/* Remove this entry from this cache line */
cl.erase (c);
} else {
image_cache_size = 0;
}
+ DEBUG_TRACE (DEBUG::WaveView, string_compose ("cache shrunk to %1\n", image_cache_size));
}
/* Remove from the linear list, even if we didn't find it in
void
WaveViewCache::set_image_cache_threshold (uint64_t sz)
{
+ DEBUG_TRACE (DEBUG::WaveView, string_compose ("new image cache size \n", sz));
_image_cache_threshold = sz;
cache_flush ();
}