note display performance.
[ardour.git] / gtk2_ardour / ghostregion.h
index 377530e2ea5cbf6045dc0c2c9c86bf0c5c1f32a1..aa4ec8b2f32b8cfd944cdb186a66070da00ef8ab 100644 (file)
@@ -21,6 +21,7 @@
 #define __ardour_gtk_ghost_region_h__
 
 #include <vector>
+#include <boost/unordered_map.hpp>
 #include "pbd/signals.h"
 
 namespace ArdourCanvas {
@@ -86,6 +87,7 @@ public:
 
            NoteBase* event;
            ArdourCanvas::Item* item;
+           bool is_hit;
        };
 
        MidiGhostRegion(RegionView& rv,
@@ -116,14 +118,15 @@ public:
        void clear_events();
 
 private:
+       ArdourCanvas::Container* _note_group;
        ArdourCanvas::Color _outline;
        ArdourCanvas::Rectangle* _tmp_rect;
        ArdourCanvas::Polygon* _tmp_poly;
 
-       MidiGhostRegion::GhostEvent* find_event (NoteBase*);
        typedef Evoral::Note<Evoral::Beats> NoteType;
+       MidiGhostRegion::GhostEvent* find_event (boost::shared_ptr<NoteType>);
 
-       typedef std::map<boost::shared_ptr<NoteType>, MidiGhostRegion::GhostEvent* > EventList;
+       typedef boost::unordered_map<boost::shared_ptr<NoteType>, MidiGhostRegion::GhostEvent* > EventList;
        EventList events;
        EventList::iterator _optimization_iterator;
 };