Basic DEBUG_TRACE for layering code.

git-svn-id: svn://localhost/ardour2/branches/3.0@11091 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-12-27 16:29:40 +00:00
parent e41d64724c
commit 8f46200449
3 changed files with 13 additions and 0 deletions

View File

@ -56,6 +56,7 @@ namespace PBD {
extern uint64_t ControlProtocols;
extern uint64_t CycleTimers;
extern uint64_t MidiTrackers;
extern uint64_t Layering;
}
}

View File

@ -53,4 +53,5 @@ uint64_t PBD::DEBUG::AudioUnits = PBD::new_debug_bit ("audiounits");
uint64_t PBD::DEBUG::ControlProtocols = PBD::new_debug_bit ("controlprotocols");
uint64_t PBD::DEBUG::CycleTimers = PBD::new_debug_bit ("cycletimers");
uint64_t PBD::DEBUG::MidiTrackers = PBD::new_debug_bit ("miditrackers");
uint64_t PBD::DEBUG::Layering = PBD::new_debug_bit ("layering");

View File

@ -2361,9 +2361,16 @@ Playlist::compute_temporary_layers (RegionList const & relayer_regions)
for (RegionList::const_iterator i = relayer_regions.begin(); i != relayer_regions.end(); ++i) {
DEBUG_TRACE (DEBUG::Layering, string_compose ("Compute temporary layer for %1\n", (*i)->name()));
/* current_overlaps: regions that overlap *i now */
RegionList current_overlaps = cache.get ((*i)->bounds ());
current_overlaps.remove (*i);
DEBUG_TRACE (DEBUG::Layering, "Current overlaps:\n");
for (RegionList::iterator j = current_overlaps.begin(); j != current_overlaps.end(); ++j) {
DEBUG_TRACE (DEBUG::Layering, string_compose ("\t%1\n", (*j)->name()));
}
/* overlaps_to_preserve: regions that overlap *i now, but which aren't being
worked on during this relayer: these will have their relationship with
@ -2486,6 +2493,8 @@ Playlist::commit_temporary_layers (TemporaryLayers const & temporary_layers)
RegionList all_regions = regions.rlist ();
all_regions.sort (SortByTemporaryLayer (temporary_layers));
DEBUG_TRACE (DEBUG::Layering, "Commit layering:\n");
for (RegionList::iterator i = all_regions.begin(); i != all_regions.end(); ++i) {
/* Go through the regions that we have already layered and hence work
@ -2509,6 +2518,8 @@ Playlist::commit_temporary_layers (TemporaryLayers const & temporary_layers)
/* no overlap, so put on the bottom layer */
(*i)->set_layer (0);
}
DEBUG_TRACE (DEBUG::Layering, string_compose ("\t%1 %2\n", (*i)->name(), (*i)->layer()));
}
notify_layering_changed ();