diff options
-rw-r--r-- | libs/ardour/ardour/debug.h | 1 | ||||
-rw-r--r-- | libs/ardour/debug.cc | 1 | ||||
-rw-r--r-- | libs/ardour/playlist.cc | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h index 58bc4f7af4..9397198838 100644 --- a/libs/ardour/ardour/debug.h +++ b/libs/ardour/ardour/debug.h @@ -56,6 +56,7 @@ namespace PBD { extern uint64_t ControlProtocols; extern uint64_t CycleTimers; extern uint64_t MidiTrackers; + extern uint64_t Layering; } } diff --git a/libs/ardour/debug.cc b/libs/ardour/debug.cc index c18834219e..90793054ad 100644 --- a/libs/ardour/debug.cc +++ b/libs/ardour/debug.cc @@ -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"); diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index f2084fda0c..4d7e63599f 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -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 (); |