Crapola - this is an experimental performance hack that must be reverted.
This commit is contained in:
parent
c6d9d8193b
commit
4f7a4cd233
@ -231,23 +231,24 @@ AudioRegionView::init (bool wfd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const string line_name = _region->name() + ":gain";
|
const string line_name = _region->name() + ":gain";
|
||||||
|
|
||||||
gain_line.reset (new AudioRegionGainLine (line_name, *this, *group, audio_region()->envelope()));
|
gain_line.reset (new AudioRegionGainLine (line_name, *this, *group, audio_region()->envelope()));
|
||||||
|
|
||||||
update_envelope_visibility ();
|
update_envelope_visibility ();
|
||||||
gain_line->reset ();
|
gain_line->reset ();
|
||||||
|
|
||||||
set_height (trackview.current_height()); // XXX not correct for Layered mode, but set_height() will fix later.
|
/* streamview will call set_height() */
|
||||||
|
//set_height (trackview.current_height()); // XXX not correct for Layered mode, but set_height() will fix later.
|
||||||
|
|
||||||
region_muted ();
|
region_muted ();
|
||||||
region_sync_changed ();
|
region_sync_changed ();
|
||||||
|
|
||||||
region_resized (ARDOUR::bounds_change);
|
region_resized (ARDOUR::bounds_change);
|
||||||
|
/* region_resized sets ghost region duration */
|
||||||
|
|
||||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
/* region_locked is a synonym for region_renamed () which is called in region_muted() above */
|
||||||
(*i)->set_duration (_region->length() / samples_per_pixel);
|
//region_locked ();
|
||||||
}
|
|
||||||
|
|
||||||
region_locked ();
|
|
||||||
envelope_active_changed ();
|
envelope_active_changed ();
|
||||||
fade_in_active_changed ();
|
fade_in_active_changed ();
|
||||||
fade_out_active_changed ();
|
fade_out_active_changed ();
|
||||||
@ -274,15 +275,14 @@ AudioRegionView::init (bool wfd)
|
|||||||
|
|
||||||
setup_waveform_visibility ();
|
setup_waveform_visibility ();
|
||||||
|
|
||||||
pending_peak_data->raise_to_top ();
|
/* reset_width_dependent_items() does this:
|
||||||
|
|
||||||
if (frame_handle_start) {
|
if (frame_handle_start) {
|
||||||
frame_handle_start->raise_to_top ();
|
frame_handle_start->raise_to_top ();
|
||||||
}
|
}
|
||||||
if (frame_handle_end) {
|
if (frame_handle_end) {
|
||||||
frame_handle_end->raise_to_top ();
|
frame_handle_end->raise_to_top ();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/* XXX sync mark drag? */
|
/* XXX sync mark drag? */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,6 +449,10 @@ AudioRegionView::region_resized (const PropertyChange& what_changed)
|
|||||||
void
|
void
|
||||||
AudioRegionView::reset_width_dependent_items (double pixel_width)
|
AudioRegionView::reset_width_dependent_items (double pixel_width)
|
||||||
{
|
{
|
||||||
|
if (pixel_width == _width) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RegionView::reset_width_dependent_items(pixel_width);
|
RegionView::reset_width_dependent_items(pixel_width);
|
||||||
assert(_pixel_width == pixel_width);
|
assert(_pixel_width == pixel_width);
|
||||||
|
|
||||||
@ -530,6 +534,10 @@ AudioRegionView::setup_fade_handle_positions()
|
|||||||
void
|
void
|
||||||
AudioRegionView::set_height (gdouble height)
|
AudioRegionView::set_height (gdouble height)
|
||||||
{
|
{
|
||||||
|
if (height == _height) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RegionView::set_height (height);
|
RegionView::set_height (height);
|
||||||
pending_peak_data->set_y1 (height);
|
pending_peak_data->set_y1 (height);
|
||||||
|
|
||||||
|
@ -271,12 +271,12 @@ MidiRegionView::init (bool wfd)
|
|||||||
|
|
||||||
RegionView::init (false);
|
RegionView::init (false);
|
||||||
|
|
||||||
set_height (trackview.current_height());
|
//set_height (trackview.current_height());
|
||||||
|
|
||||||
region_muted ();
|
region_muted ();
|
||||||
region_sync_changed ();
|
region_sync_changed ();
|
||||||
region_resized (ARDOUR::bounds_change);
|
region_resized (ARDOUR::bounds_change);
|
||||||
region_locked ();
|
//region_locked ();
|
||||||
|
|
||||||
set_colors ();
|
set_colors ();
|
||||||
|
|
||||||
|
@ -178,13 +178,14 @@ RegionView::init (bool wfd)
|
|||||||
_enable_display = true;
|
_enable_display = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_height (trackview.current_height());
|
/* derived class calls set_height () including RegionView::set_height() in ::init() */
|
||||||
|
//set_height (trackview.current_height());
|
||||||
|
|
||||||
_region->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::region_changed, this, _1), gui_context());
|
_region->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::region_changed, this, _1), gui_context());
|
||||||
|
|
||||||
set_colors ();
|
/* derived class calls set_colors () including RegionView::set_colors() in ::init() */
|
||||||
|
//set_colors ();
|
||||||
UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &RegionView::color_handler));
|
//UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &RegionView::color_handler));
|
||||||
|
|
||||||
/* XXX sync mark drag? */
|
/* XXX sync mark drag? */
|
||||||
}
|
}
|
||||||
@ -588,7 +589,6 @@ RegionView::region_renamed ()
|
|||||||
|
|
||||||
set_item_name (str, this);
|
set_item_name (str, this);
|
||||||
set_name_text (str);
|
set_name_text (str);
|
||||||
reset_width_dependent_items (_pixel_width);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -775,18 +775,11 @@ RegionView::update_coverage_frames (LayerDisplay d)
|
|||||||
/* the color that will be used to show parts of regions that will not be heard */
|
/* the color that will be used to show parts of regions that will not be heard */
|
||||||
uint32_t const non_playing_color = UIConfiguration::instance().color_mod ("covered region", "covered region base");
|
uint32_t const non_playing_color = UIConfiguration::instance().color_mod ("covered region", "covered region base");
|
||||||
|
|
||||||
while (t < end) {
|
t = pl->find_next_region_boundary (t, 1);
|
||||||
|
|
||||||
t++;
|
|
||||||
|
|
||||||
/* is this region is on top at time t? */
|
/* is this region is on top at time t? */
|
||||||
bool const new_me = (pl->top_unmuted_region_at (t) == _region);
|
bool const new_me = (pl->top_unmuted_region_at (t) == _region);
|
||||||
|
|
||||||
/* finish off any old rect, if required */
|
|
||||||
if (cr && me != new_me) {
|
|
||||||
cr->set_x1 (trackview.editor().sample_to_pixel (t - position));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* start off any new rect, if required */
|
/* start off any new rect, if required */
|
||||||
if (cr == 0 || me != new_me) {
|
if (cr == 0 || me != new_me) {
|
||||||
cr = new ArdourCanvas::Rectangle (group);
|
cr = new ArdourCanvas::Rectangle (group);
|
||||||
@ -803,13 +796,6 @@ RegionView::update_coverage_frames (LayerDisplay d)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t = pl->find_next_region_boundary (t, 1);
|
|
||||||
if (t < 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
me = new_me;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cr) {
|
if (cr) {
|
||||||
/* finish off the last rectangle */
|
/* finish off the last rectangle */
|
||||||
cr->set_x1 (trackview.editor().sample_to_pixel (end - position));
|
cr->set_x1 (trackview.editor().sample_to_pixel (end - position));
|
||||||
|
@ -119,7 +119,7 @@ StreamView::set_height (double h)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canvas_rect->y1() == h) {
|
if (height == h) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +139,10 @@ StreamView::set_samples_per_pixel (double fpp)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fpp == _samples_per_pixel) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
_samples_per_pixel = fpp;
|
_samples_per_pixel = fpp;
|
||||||
|
|
||||||
for (i = region_views.begin(); i != region_views.end(); ++i) {
|
for (i = region_views.begin(); i != region_views.end(); ++i) {
|
||||||
@ -292,7 +296,8 @@ StreamView::playlist_layered (boost::weak_ptr<Track> wtr)
|
|||||||
|
|
||||||
if (_layer_display == Stacked) {
|
if (_layer_display == Stacked) {
|
||||||
update_contents_height ();
|
update_contents_height ();
|
||||||
update_coverage_frames ();
|
/* tricky. playlist_changed() does this as well, and its really inefficient. */
|
||||||
|
//update_coverage_frames ();
|
||||||
} else {
|
} else {
|
||||||
/* layering has probably been modified. reflect this in the canvas. */
|
/* layering has probably been modified. reflect this in the canvas. */
|
||||||
layer_regions();
|
layer_regions();
|
||||||
@ -311,12 +316,12 @@ StreamView::playlist_switched (boost::weak_ptr<Track> wtr)
|
|||||||
/* disconnect from old playlist */
|
/* disconnect from old playlist */
|
||||||
|
|
||||||
playlist_connections.drop_connections ();
|
playlist_connections.drop_connections ();
|
||||||
undisplay_track ();
|
//undisplay_track ();
|
||||||
|
|
||||||
/* draw it */
|
/* draw it */
|
||||||
|
tr->playlist()->freeze();
|
||||||
redisplay_track ();
|
redisplay_track ();
|
||||||
|
tr->playlist()->thaw();
|
||||||
/* update layers count and the y positions and heights of our regions */
|
/* update layers count and the y positions and heights of our regions */
|
||||||
_layers = tr->playlist()->top_layer() + 1;
|
_layers = tr->playlist()->top_layer() + 1;
|
||||||
update_contents_height ();
|
update_contents_height ();
|
||||||
|
@ -160,7 +160,6 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
|
|||||||
{
|
{
|
||||||
group = new ArdourCanvas::Container (parent);
|
group = new ArdourCanvas::Container (parent);
|
||||||
CANVAS_DEBUG_NAME (group, string_compose ("TAVI group for %1", get_item_name()));
|
CANVAS_DEBUG_NAME (group, string_compose ("TAVI group for %1", get_item_name()));
|
||||||
group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
|
|
||||||
|
|
||||||
fill_color = base_color;
|
fill_color = base_color;
|
||||||
fill_color_name = "time axis view item base";
|
fill_color_name = "time axis view item base";
|
||||||
@ -247,13 +246,14 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
|
|||||||
frame_handle_start = frame_handle_end = 0;
|
frame_handle_start = frame_handle_end = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_color (base_color);
|
//set_color (base_color);
|
||||||
|
|
||||||
set_duration (item_duration, this);
|
//set_duration (item_duration, this);
|
||||||
set_position (start, this);
|
//set_position (start, this);
|
||||||
|
|
||||||
Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ());
|
group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
|
||||||
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &TimeAxisViewItem::parameter_changed));
|
//Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ());
|
||||||
|
//UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &TimeAxisViewItem::parameter_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeAxisViewItem::~TimeAxisViewItem()
|
TimeAxisViewItem::~TimeAxisViewItem()
|
||||||
@ -532,7 +532,7 @@ TimeAxisViewItem::set_name_text(const string& new_name)
|
|||||||
name_text_width = pixel_width (new_name, NAME_FONT) + 2;
|
name_text_width = pixel_width (new_name, NAME_FONT) + 2;
|
||||||
name_text->set (new_name);
|
name_text->set (new_name);
|
||||||
manage_name_text ();
|
manage_name_text ();
|
||||||
|
manage_name_highlight ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -569,8 +569,6 @@ TimeAxisViewItem::set_height (double height)
|
|||||||
selection_frame->set (frame->get().shrink (1.0));
|
selection_frame->set (frame->get().shrink (1.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_colors ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -235,9 +235,9 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
|||||||
bool _recregion;
|
bool _recregion;
|
||||||
bool _automation; ///< true if this is an automation region view
|
bool _automation; ///< true if this is an automation region view
|
||||||
bool _dragging;
|
bool _dragging;
|
||||||
|
double _width;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _width;
|
|
||||||
|
|
||||||
void parameter_changed (std::string);
|
void parameter_changed (std::string);
|
||||||
void manage_name_highlight ();
|
void manage_name_highlight ();
|
||||||
|
@ -187,7 +187,7 @@ TimeInfoBox::region_property_change (boost::shared_ptr<ARDOUR::Region> /* r */,
|
|||||||
* RegionView (not Region itself).
|
* RegionView (not Region itself).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
selection_changed ();
|
//selection_changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -1822,6 +1822,7 @@ Playlist::regions_at (framepos_t frame)
|
|||||||
for (RegionList::iterator i = rlist->begin(); i != rlist->end(); ) {
|
for (RegionList::iterator i = rlist->begin(); i != rlist->end(); ) {
|
||||||
|
|
||||||
RegionList::iterator tmp = i;
|
RegionList::iterator tmp = i;
|
||||||
|
|
||||||
++tmp;
|
++tmp;
|
||||||
|
|
||||||
if ((*i)->muted()) {
|
if ((*i)->muted()) {
|
||||||
@ -2047,23 +2048,25 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
|
|||||||
|
|
||||||
boost::shared_ptr<Region> r = (*i);
|
boost::shared_ptr<Region> r = (*i);
|
||||||
frameoffset_t distance;
|
frameoffset_t distance;
|
||||||
|
const framepos_t first_frame = r->first_frame();
|
||||||
|
const framepos_t last_frame = r->last_frame();
|
||||||
|
|
||||||
if (r->first_frame() > frame) {
|
if (first_frame > frame) {
|
||||||
|
|
||||||
distance = r->first_frame() - frame;
|
distance = first_frame - frame;
|
||||||
|
|
||||||
if (distance < closest) {
|
if (distance < closest) {
|
||||||
ret = r->first_frame();
|
ret = first_frame;
|
||||||
closest = distance;
|
closest = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->last_frame () > frame) {
|
if (last_frame > frame) {
|
||||||
|
|
||||||
distance = r->last_frame () - frame;
|
distance = last_frame - frame;
|
||||||
|
|
||||||
if (distance < closest) {
|
if (distance < closest) {
|
||||||
ret = r->last_frame ();
|
ret = last_frame;
|
||||||
closest = distance;
|
closest = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2075,23 +2078,25 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
|
|||||||
|
|
||||||
boost::shared_ptr<Region> r = (*i);
|
boost::shared_ptr<Region> r = (*i);
|
||||||
frameoffset_t distance;
|
frameoffset_t distance;
|
||||||
|
const framepos_t first_frame = r->first_frame();
|
||||||
|
const framepos_t last_frame = r->last_frame();
|
||||||
|
|
||||||
if (r->last_frame() < frame) {
|
if (last_frame < frame) {
|
||||||
|
|
||||||
distance = frame - r->last_frame();
|
distance = frame - last_frame;
|
||||||
|
|
||||||
if (distance < closest) {
|
if (distance < closest) {
|
||||||
ret = r->last_frame();
|
ret = last_frame;
|
||||||
closest = distance;
|
closest = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->first_frame() < frame) {
|
if (first_frame < frame) {
|
||||||
|
|
||||||
distance = frame - r->first_frame();
|
distance = frame - first_frame;
|
||||||
|
|
||||||
if (distance < closest) {
|
if (distance < closest) {
|
||||||
ret = r->first_frame();
|
ret = first_frame;
|
||||||
closest = distance;
|
closest = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2899,6 +2904,7 @@ Playlist::update_after_tempo_map_change ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
thaw ();
|
thaw ();
|
||||||
|
notify_contents_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -70,6 +70,10 @@ Text::~Text ()
|
|||||||
void
|
void
|
||||||
Text::set (string const & text)
|
Text::set (string const & text)
|
||||||
{
|
{
|
||||||
|
if (text == _text) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
begin_change ();
|
begin_change ();
|
||||||
|
|
||||||
_text = text;
|
_text = text;
|
||||||
@ -237,6 +241,10 @@ Text::compute_bounding_box () const
|
|||||||
void
|
void
|
||||||
Text::set_alignment (Pango::Alignment alignment)
|
Text::set_alignment (Pango::Alignment alignment)
|
||||||
{
|
{
|
||||||
|
if (alignment == _alignment) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
begin_change ();
|
begin_change ();
|
||||||
|
|
||||||
_alignment = alignment;
|
_alignment = alignment;
|
||||||
@ -261,6 +269,10 @@ Text::set_font_description (Pango::FontDescription font_description)
|
|||||||
void
|
void
|
||||||
Text::set_color (Color color)
|
Text::set_color (Color color)
|
||||||
{
|
{
|
||||||
|
if (color == _color) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
begin_change ();
|
begin_change ();
|
||||||
|
|
||||||
_color = color;
|
_color = color;
|
||||||
|
Loading…
Reference in New Issue
Block a user