summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.h
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2017-04-01 21:33:59 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-06-26 08:40:47 +1000
commit265f52535a73d996de0e6a61a5b30070c6226cf8 (patch)
tree0a402ff1af29f0117ad5c647de8e2a5eff1353a9 /gtk2_ardour/editor.h
parentdac25b8db9686f4a6dd03fcc2d616004b1c1dd44 (diff)
Coalesce visual changes to canvas/items and allow canvas to render
First visual change will be processed as normal and then blocked until the canvas renders the change. If further visual changes need processing then Editor::pre_render callback will schedule another expose/redraw/render. This prevents an issue where idle_visual_changer is called many times in response to events(keys/motion/etc) but the canvas does not get a chance to render any but the last one which results in a big pause/jump. This results in a more responsive canvas and in particular a smoother and more predictable zooming experience.
Diffstat (limited to 'gtk2_ardour/editor.h')
-rw-r--r--gtk2_ardour/editor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 60bf93494d..bce6caa912 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1148,6 +1148,9 @@ private:
};
VisualChange pending_visual_change;
+ bool visual_change_queued;
+
+ void pre_render ();
static int _idle_visual_changer (void *arg);
int idle_visual_changer ();