diff options
author | nick_m <mainsbridge@gmail.com> | 2017-01-04 00:19:31 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-01-04 00:19:31 +1100 |
commit | 9e9f99f0048e05323b91aad95425197e11290181 (patch) | |
tree | 61a48473480cd6d38a5ba44a9b2880bd25703bfc /gtk2_ardour/ghostregion.cc | |
parent | 7785389e5015933067ec636623fc91987a81e928 (diff) |
note display performance.
use boost::unordered_map as a note store for ghost & midi region
views.
as per otiginal method, only notes within regoin bounds are stored.
Diffstat (limited to 'gtk2_ardour/ghostregion.cc')
-rw-r--r-- | gtk2_ardour/ghostregion.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc index f48680cef7..0528671515 100644 --- a/gtk2_ardour/ghostregion.cc +++ b/gtk2_ardour/ghostregion.cc @@ -381,7 +381,7 @@ MidiGhostRegion::update_note (Note* note, bool hide) return; } - GhostEvent* ev = find_event (note); + GhostEvent* ev = find_event (note->note()); if (!ev) { return; @@ -414,7 +414,7 @@ MidiGhostRegion::update_hit (Hit* hit, bool hide) return; } - GhostEvent* ev = find_event (hit); + GhostEvent* ev = find_event (hit->note()); if (!ev) { return; @@ -460,7 +460,7 @@ MidiGhostRegion::remove_note (NoteBase* note) */ MidiGhostRegion::GhostEvent * -MidiGhostRegion::find_event (NoteBase* parent) +MidiGhostRegion::find_event (boost::shared_ptr<NoteType> parent) { /* we are using _optimization_iterator to speed up the common case where a caller is going through our notes in order. @@ -468,12 +468,12 @@ MidiGhostRegion::find_event (NoteBase* parent) if (_optimization_iterator != events.end()) { ++_optimization_iterator; - if (_optimization_iterator != events.end() && _optimization_iterator->second->event == parent) { + if (_optimization_iterator != events.end() && _optimization_iterator->first == parent) { return _optimization_iterator->second; } } - _optimization_iterator = events.find (parent->note()); + _optimization_iterator = events.find (parent); if (_optimization_iterator != events.end()) { return _optimization_iterator->second; } |