From 4f7a4cd23331d64acfabc52e978dcb3dde2e82ec Mon Sep 17 00:00:00 2001 From: nick_m Date: Wed, 13 Apr 2016 05:38:31 +1000 Subject: Crapola - this is an experimental performance hack that must be reverted. --- gtk2_ardour/streamview.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/streamview.cc') diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index c737f7842c..28dd1ab8f1 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -119,7 +119,7 @@ StreamView::set_height (double h) return -1; } - if (canvas_rect->y1() == h) { + if (height == h) { return 0; } @@ -139,6 +139,10 @@ StreamView::set_samples_per_pixel (double fpp) return -1; } + if (fpp == _samples_per_pixel) { + return 0; + } + _samples_per_pixel = fpp; for (i = region_views.begin(); i != region_views.end(); ++i) { @@ -292,7 +296,8 @@ StreamView::playlist_layered (boost::weak_ptr wtr) if (_layer_display == Stacked) { update_contents_height (); - update_coverage_frames (); + /* tricky. playlist_changed() does this as well, and its really inefficient. */ + //update_coverage_frames (); } else { /* layering has probably been modified. reflect this in the canvas. */ layer_regions(); @@ -311,12 +316,12 @@ StreamView::playlist_switched (boost::weak_ptr wtr) /* disconnect from old playlist */ playlist_connections.drop_connections (); - undisplay_track (); + //undisplay_track (); /* draw it */ - + tr->playlist()->freeze(); redisplay_track (); - + tr->playlist()->thaw(); /* update layers count and the y positions and heights of our regions */ _layers = tr->playlist()->top_layer() + 1; update_contents_height (); -- cgit v1.2.3