diff options
author | nick_m <mainsbridge@gmail.com> | 2016-10-19 03:56:43 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-10-19 03:56:43 +1100 |
commit | 715b17813026c6baf8a4adb4442c8586e114452c (patch) | |
tree | e75622cb7aaf71514518fbaf463735afa5d3b56c /gtk2_ardour/editor.cc | |
parent | 208cb967e579d9177dce92086103c50f00b45b34 (diff) |
Improve bbt ruler drawing performance for large time ranges.
- when the timeline displays many bars, zoom/autoscroll
speed is improved by calculating the bbt ruler scale first
then requesting a suitably scaled grid.
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index f448f9ac2f..446965588d 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2239,10 +2239,8 @@ Editor::set_snap_to (SnapType st) case SnapToBeatDiv4: case SnapToBeatDiv3: case SnapToBeatDiv2: { - std::vector<TempoMap::BBTPoint> grid; - compute_current_bbt_points (grid, leftmost_frame, leftmost_frame + current_page_samples()); - compute_bbt_ruler_scale (grid, leftmost_frame, leftmost_frame + current_page_samples()); - update_tempo_based_rulers (grid); + compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + current_page_samples()); + update_tempo_based_rulers (); break; } @@ -4614,10 +4612,8 @@ Editor::visual_changer (const VisualChange& vc) compute_fixed_ruler_scale (); - std::vector<TempoMap::BBTPoint> grid; - compute_current_bbt_points (grid, vc.time_origin, pending_visual_change.time_origin + current_page_samples()); - compute_bbt_ruler_scale (grid, vc.time_origin, pending_visual_change.time_origin + current_page_samples()); - update_tempo_based_rulers (grid); + compute_bbt_ruler_scale (vc.time_origin, pending_visual_change.time_origin + current_page_samples()); + update_tempo_based_rulers (); update_video_timeline(); } |