5 #include <gtkmm2ext/gtk_ui.h>
7 #include <ardour/audioplaylist.h>
8 #include <ardour/audioregion.h>
9 #include <ardour/diskstream.h>
10 #include <ardour/audio_track.h>
11 #include <ardour/playlist_templates.h>
12 #include <ardour/source.h>
14 #include "streamview.h"
15 #include "regionview.h"
16 #include "audio_time_axis.h"
17 #include "canvas-waveview.h"
18 #include "canvas-simplerect.h"
19 #include "region_selection.h"
20 #include "selection.h"
21 #include "public_editor.h"
22 #include "ardour_ui.h"
23 #include "crossfade_view.h"
24 #include "rgb_macros.h"
25 #include "gui_thread.h"
27 using namespace ARDOUR;
28 using namespace Editing;
30 StreamView::StreamView (AudioTimeAxisView& tv)
33 region_color = _trackview.color();
34 crossfades_visible = true;
36 if (tv.is_audio_track()) {
38 //stream_base_color = RGBA_TO_UINT (222,223,218,255);
39 stream_base_color = color_map[cAudioTrackBase];
42 //stream_base_color = RGBA_TO_UINT (230,226,238,255);
43 stream_base_color = color_map[cAudioBusBase];
46 /* set_position() will position the group */
48 //GTK2FIX -- how to get the group? is the canvas display really a group?
49 //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display),
50 // gnome_canvas_group_get_type (),
52 canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display);
54 //canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
55 // gnome_canvas_simplerect_get_type(),
59 // "y2", (double) tv.height,
60 // "outline_color_rgba", color_map[cAudioTrackOutline],
61 // /* outline ends and bottom */
62 // "outline_what", (guint32) (0x1|0x2|0x8),
63 // "fill_color_rgba", stream_base_color,
65 canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
66 canvas_rect->set_property ("x1", 0.0);
67 canvas_rect->set_property ("y1", 0.0);
68 canvas_rect->set_property ("x2", 1000000.0);
69 canvas_rect->set_property ("y2", (double) tv.height);
70 canvas_rect->set_property ("outline_color_rgba", color_map[cAudioTrackOutline]);
71 /* outline ends and bottom */
72 canvas_rect->set_property ("outline_what", (guint32) (0x1|0x2|0x8));
73 canvas_rect->set_property ("fill_color_rgba", stream_base_color);
75 canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
77 _samples_per_unit = _trackview.editor.get_current_zoom();
78 _amplitude_above_axis = 1.0;
80 if (_trackview.is_audio_track()) {
81 _trackview.audio_track()->diskstream_changed.connect (mem_fun (*this, &StreamView::diskstream_changed));
82 _trackview.session().TransportStateChange.connect (mem_fun (*this, &StreamView::transport_changed));
83 _trackview.get_diskstream()->record_enable_changed.connect (mem_fun (*this, &StreamView::rec_enable_changed));
84 _trackview.session().RecordEnabled.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed));
85 _trackview.session().RecordDisabled.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed));
90 use_rec_regions = tv.editor.show_waveforms_recording ();
91 last_rec_peak_frame = 0;
94 StreamView::~StreamView ()
96 undisplay_diskstream ();
97 gtk_object_destroy (GTK_OBJECT(canvas_group));
101 StreamView::attach ()
103 if (_trackview.is_audio_track()) {
104 display_diskstream (_trackview.get_diskstream());
109 StreamView::set_position (gdouble x, gdouble y)
112 canvas_group->set_property ("x", x);
113 canvas_group->set_property ("y", y);
118 StreamView::set_height (gdouble h)
120 /* limit the values to something sane-ish */
122 if (h < 10.0 || h > 1000.0) {
126 gtk_object_set (GTK_OBJECT(canvas_rect), "y2", h, NULL);
128 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
129 (*i)->set_height (h);
132 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
133 (*i)->set_height (h);
136 for (vector<RecBoxInfo>::iterator i = rec_rects.begin(); i != rec_rects.end(); ++i) {
137 RecBoxInfo &recbox = (*i);
138 gtk_object_set (GTK_OBJECT( recbox.rectangle ), "y2", h - 1, NULL);
145 StreamView::set_samples_per_unit (gdouble spp)
147 AudioRegionViewList::iterator i;
153 _samples_per_unit = spp;
155 for (i = region_views.begin(); i != region_views.end(); ++i) {
156 (*i)->set_samples_per_unit (spp);
159 for (CrossfadeViewList::iterator xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
160 (*xi)->set_samples_per_unit (spp);
163 for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
164 RecBoxInfo &recbox = (*xi);
166 gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
167 gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
169 recbox.rectangle->set_property ("x1", xstart);
170 recbox.rectangle->set_property ("x2", xend);
177 StreamView::set_amplitude_above_axis (gdouble app)
180 AudioRegionViewList::iterator i;
186 _amplitude_above_axis = app;
188 for (i = region_views.begin(); i != region_views.end(); ++i) {
189 (*i)->set_amplitude_above_axis (app);
196 StreamView::add_region_view (Region *r)
198 add_region_view_internal (r, true);
202 StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
204 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r));
206 AudioRegion* region = dynamic_cast<AudioRegion*> (r);
212 AudioRegionView *region_view;
213 list<AudioRegionView *>::iterator i;
215 for (i = region_views.begin(); i != region_views.end(); ++i) {
216 if (&(*i)->region == region) {
218 /* great. we already have a AudioRegionView for this Region. use it again.
221 (*i)->set_valid (true);
226 region_view = new AudioRegionView (canvas_group,
230 _amplitude_above_axis,
234 region_views.push_front (region_view);
236 /* follow global waveform setting */
238 region_view->set_waveform_visible(_trackview.editor.show_waveforms());
240 /* catch regionview going away */
242 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_region_view));
244 AudioRegionViewAdded (region_view);
248 StreamView::remove_region_view (Region *r)
250 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r));
252 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
258 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
259 if (&((*i)->region) == ar) {
261 region_views.erase (i);
266 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
267 list<CrossfadeView*>::iterator tmp;
272 if ((*i)->crossfade.involves (*ar)) {
274 crossfade_views.erase (i);
282 StreamView::remove_rec_region (Region *r)
284 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r));
286 if (!Gtkmm2ext::UI::instance()->caller_is_gui_thread()) {
287 fatal << "region deleted from non-GUI thread!" << endmsg;
291 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
297 for (list<AudioRegion *>::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) {
299 rec_regions.erase (i);
306 StreamView::undisplay_diskstream ()
308 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
312 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
316 region_views.clear();
317 crossfade_views.clear ();
321 StreamView::display_diskstream (DiskStream *ds)
323 playlist_change_connection.disconnect();
324 playlist_changed (ds);
325 playlist_change_connection = ds->PlaylistChanged.connect (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
329 StreamView::playlist_modified ()
331 ENSURE_GUI_THREAD (mem_fun (*this, &StreamView::playlist_modified));
333 /* if the playlist is modified, make sure xfades are on top and all the regionviews are stacked
337 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
341 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
342 (*i)->get_canvas_group()->raise_to_top();
347 StreamView::playlist_changed (DiskStream *ds)
349 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
351 /* disconnect from old playlist */
353 for (vector<sigc::connection>::iterator i = playlist_connections.begin(); i != playlist_connections.end(); ++i) {
357 playlist_connections.clear();
358 undisplay_diskstream ();
362 redisplay_diskstream ();
366 playlist_connections.push_back (ds->playlist()->RegionAdded.connect (mem_fun (*this, &StreamView::add_region_view)));
367 playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (mem_fun (*this, &StreamView::remove_region_view)));
368 playlist_connections.push_back (ds->playlist()->StateChanged.connect (mem_fun (*this, &StreamView::playlist_state_changed)));
369 playlist_connections.push_back (ds->playlist()->Modified.connect (mem_fun (*this, &StreamView::playlist_modified)));
370 playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
374 StreamView::add_crossfade (Crossfade *crossfade)
376 AudioRegionView* lview = 0;
377 AudioRegionView* rview = 0;
379 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_crossfade), crossfade));
381 /* first see if we already have a CrossfadeView for this Crossfade */
383 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
384 if (&(*i)->crossfade == crossfade) {
385 if (!crossfades_visible) {
390 (*i)->set_valid (true);
395 /* create a new one */
397 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
398 if (!lview && &((*i)->region) == &crossfade->out()) {
401 if (!rview && &((*i)->region) == &crossfade->in()) {
406 CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display,
413 crossfade->Invalidated.connect (mem_fun (*this, &StreamView::remove_crossfade));
414 crossfade_views.push_back (cv);
416 if (!crossfades_visible) {
422 StreamView::remove_crossfade (Crossfade *xfade)
424 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_crossfade), xfade));
426 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
427 if (&(*i)->crossfade == xfade) {
429 crossfade_views.erase (i);
436 StreamView::playlist_state_changed (Change ignored)
438 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_state_changed), ignored));
440 redisplay_diskstream ();
444 StreamView::redisplay_diskstream ()
446 list<AudioRegionView *>::iterator i, tmp;
447 list<CrossfadeView*>::iterator xi, tmpx;
449 for (i = region_views.begin(); i != region_views.end(); ++i) {
450 (*i)->set_valid (false);
453 for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
454 (*xi)->set_valid (false);
455 if ((*xi)->visible()) {
460 if (_trackview.is_audio_track()) {
461 _trackview.get_diskstream()->playlist()->foreach_region (this, &StreamView::add_region_view);
462 _trackview.get_diskstream()->playlist()->foreach_crossfade (this, &StreamView::add_crossfade);
465 for (i = region_views.begin(); i != region_views.end(); ) {
469 if (!(*i)->is_valid()) {
471 region_views.erase (i);
477 for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
481 if (!(*xi)->valid()) {
483 crossfade_views.erase (xi);
489 /* now fix layering */
491 playlist_modified ();
495 StreamView::diskstream_changed (void *src_ignored)
499 if ((at = _trackview.audio_track()) != 0) {
500 DiskStream& ds = at->disk_stream();
501 /* XXX grrr: when will SigC++ allow me to bind references? */
502 Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*this, &StreamView::display_diskstream), &ds));
504 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
509 StreamView::apply_color (Gdk::Color& color, ColorTarget target)
512 list<AudioRegionView *>::iterator i;
516 region_color = color;
517 for (i = region_views.begin(); i != region_views.end(); ++i) {
518 (*i)->set_color (region_color);
520 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
521 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
524 case StreamBaseColor:
525 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
526 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
532 StreamView::set_show_waveforms (bool yn)
534 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
535 (*i)->set_waveform_visible (yn);
540 StreamView::set_selected_regionviews (AudioRegionSelection& regions)
544 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
548 for (AudioRegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) {
554 (*i)->set_selected (selected, this);
559 StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
561 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
562 if ((*i)->region.coverage(start, end) != OverlapNone) {
563 results.push_back (*i);
569 StreamView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
571 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
572 if (!sel.audio_regions.contains (*i)) {
573 results.push_back (*i);
579 StreamView::set_waveform_shape (WaveformShape shape)
581 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
582 (*i)->set_waveform_shape (shape);
587 StreamView::region_layered (AudioRegionView* rv)
589 rv->get_canvas_group()->lower_to_bottom();
591 /* don't ever leave it at the bottom, since then it doesn't
592 get events - the parent group does instead ...
595 rv->get_canvas_group()->raise (rv->region.layer() + 1);
599 StreamView::rec_enable_changed (void *src)
601 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
605 StreamView::sess_rec_enable_changed ()
607 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
611 StreamView::transport_changed()
613 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
617 StreamView::setup_rec_box ()
619 // cerr << _trackview.name() << " streamview SRB\n";
621 if (_trackview.session().transport_rolling()) {
623 // cerr << "\trolling\n";
626 && _trackview.session().record_status() == Session::Recording
627 && _trackview.get_diskstream()->record_enabled()) {
629 if (use_rec_regions && rec_regions.size() == rec_rects.size()) {
630 /* add a new region, but don't bother if they set use_rec_regions mid-record */
632 AudioRegion::SourceList sources;
634 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
637 peak_ready_connections.clear();
639 for (uint32_t n=0; n < _trackview.get_diskstream()->n_channels(); ++n) {
640 Source *src = (Source *) _trackview.get_diskstream()->write_source (n);
642 sources.push_back (src);
643 peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &StreamView::rec_peak_range_ready), src)));
649 jack_nframes_t start = 0;
650 if (rec_regions.size() > 0) {
651 start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
654 AudioRegion * region = new AudioRegion(sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false);
655 region->set_position (_trackview.session().transport_frame(), this);
656 rec_regions.push_back (region);
657 /* catch it if it goes away */
658 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_rec_region));
660 /* we add the region later */
663 /* start a new rec box */
667 at = _trackview.audio_track(); /* we know what it is already */
668 DiskStream& ds = at->disk_stream();
669 jack_nframes_t frame_pos = ds.current_capture_start ();
670 gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
671 gdouble xend = xstart;
673 ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
674 rec_rect->set_property ("x1", xstart);
675 rec_rect->set_property ("y1", 1.0);
676 rec_rect->set_property ("x2", xend);
677 rec_rect->set_property ("y2", (double) _trackview.height - 1);
678 rec_rect->set_property ("outline_color_rgba", color_map[cRecordingRectOutline]);
679 rec_rect->set_property ("fill_color_rgba", color_map[cRecordingRectFill]);
682 recbox.rectangle = rec_rect;
683 recbox.start = _trackview.session().transport_frame();
686 rec_rects.push_back (recbox);
688 screen_update_connection.disconnect();
689 screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &StreamView::update_rec_box));
693 } else if (rec_active &&
694 (_trackview.session().record_status() != Session::Recording ||
695 !_trackview.get_diskstream()->record_enabled())) {
697 screen_update_connection.disconnect();
699 rec_updating = false;
705 // cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
707 if (!rec_rects.empty() || !rec_regions.empty()) {
709 /* disconnect rapid update */
710 screen_update_connection.disconnect();
712 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
715 peak_ready_connections.clear();
717 rec_updating = false;
719 last_rec_peak_frame = 0;
721 /* remove temp regions */
722 for (list<AudioRegion*>::iterator iter=rec_regions.begin(); iter != rec_regions.end(); )
724 list<AudioRegion*>::iterator tmp;
729 /* this will trigger the remove_region_view */
737 // cerr << "\tclear " << rec_rects.size() << " rec rects\n";
740 /* transport stopped, clear boxes */
741 for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
742 RecBoxInfo &rect = (*iter);
743 gtk_object_destroy (GTK_OBJECT(rect.rectangle));
754 StreamView::update_rec_box ()
756 /* only update the last box */
757 if (rec_active && rec_rects.size() > 0) {
758 RecBoxInfo & rect = rec_rects.back();
759 jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
761 rect.length = at - rect.start;
763 gdouble xstart = _trackview.editor.frame_to_pixel ( rect.start );
764 gdouble xend = _trackview.editor.frame_to_pixel ( at );
766 rect.rectangle->set_property ("x1", xstart);
767 rect.rectangle->set_property ("x2", xend);
772 StreamView::find_view (const AudioRegion& region)
774 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
776 if (&(*i)->region == ®ion) {
784 StreamView::foreach_regionview (sigc::slot<void,AudioRegionView*> slot)
786 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
792 StreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
794 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
800 StreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, Source * src)
802 // this is called from the peak building thread
804 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::rec_peak_range_ready), start, cnt, src));
806 if (rec_peak_ready_map.size() == 0 || start+cnt > last_rec_peak_frame) {
807 last_rec_peak_frame = start + cnt;
810 rec_peak_ready_map[src] = true;
812 if (rec_peak_ready_map.size() == _trackview.get_diskstream()->n_channels()) {
813 this->update_rec_regions ();
814 rec_peak_ready_map.clear();
819 StreamView::update_rec_regions ()
821 if (use_rec_regions) {
825 for (list<AudioRegion*>::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
827 list<AudioRegion*>::iterator tmp;
832 if ((GTK_OBJECT_FLAGS(GTK_OBJECT(rec_rects[n].rectangle)) & GNOME_CANVAS_ITEM_VISIBLE) == 0) {
833 /* rect already hidden, this region is done */
838 AudioRegion * region = (*iter);
839 jack_nframes_t origlen = region->length();
841 if (region == rec_regions.back() && rec_active) {
843 if (last_rec_peak_frame > region->start()) {
845 jack_nframes_t nlen = last_rec_peak_frame - region->start();
847 if (nlen != region->length()) {
850 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
851 region->set_length (nlen, this);
852 region->thaw ("updated");
855 /* our special initial length */
856 add_region_view_internal (region, false);
859 /* also update rect */
860 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
861 gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
862 rect->set_property ("x2", xend);
868 jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
870 if (nlen != region->length()) {
872 if (region->source(0).length() >= region->start() + nlen) {
875 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
876 region->set_length (nlen, this);
877 region->thaw ("updated");
880 /* our special initial length */
881 add_region_view_internal (region, false);
885 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
898 StreamView::show_all_xfades ()
900 foreach_crossfadeview (&CrossfadeView::show);
901 crossfades_visible = true;
905 StreamView::hide_all_xfades ()
907 foreach_crossfadeview (&CrossfadeView::hide);
908 crossfades_visible = false;
912 StreamView::hide_xfades_involving (AudioRegionView& rv)
914 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
915 if ((*i)->crossfade.involves (rv.region)) {
922 StreamView::reveal_xfades_involving (AudioRegionView& rv)
924 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
925 if ((*i)->crossfade.involves (rv.region) && (*i)->visible()) {