+ cairo_line_to (cr, q, get_height());
+ cairo_stroke (cr);
+
+ cairo_destroy (cr);
+}
+
+/** Render the required regions to a cairo context.
+ * @param cr Context.
+ */
+void
+EditorSummary::render (cairo_t* cr, cairo_rectangle_t*)
+{
+
+ if (_session == 0) {
+ return;
+ }
+
+ if (!_image || _background_dirty) {
+ render_background_image ();
+ _background_dirty = false;
+ }
+
+ cairo_push_group (cr);
+
+ /* Fill with the background image */
+
+ cairo_rectangle (cr, 0, 0, get_width(), get_height());
+ cairo_set_source_surface (cr, _image, 0, 0);
+ cairo_fill (cr);
+
+ /* Render the view rectangle. If there is an editor visual pending, don't update
+ the view rectangle now --- wait until the expose event that we'll get after
+ the visual change. This prevents a flicker.
+ */
+
+ if (_editor->pending_visual_change.idle_handler_id < 0) {
+ get_editor (&_view_rectangle_x, &_view_rectangle_y);
+ }
+
+ int32_t width = _view_rectangle_x.second - _view_rectangle_x.first;
+ int32_t height = _view_rectangle_y.second - _view_rectangle_y.first;
+ cairo_rectangle (cr, _view_rectangle_x.first, _view_rectangle_y.first, width, height);
+ cairo_set_source_rgba (cr, 1, 1, 1, 0.1);
+ cairo_fill_preserve (cr);
+ cairo_set_line_width (cr, 1);
+ cairo_set_source_rgba (cr, 1, 1, 1, 0.4);
+ cairo_stroke (cr);
+
+ /* Playhead */
+
+ cairo_set_line_width (cr, 1);
+ /* XXX: colour should be set from configuration file */
+ cairo_set_source_rgba (cr, 1, 0, 0, 1);
+
+ const double ph= playhead_frame_to_position (_editor->playhead_cursor->current_frame());
+ cairo_move_to (cr, ph, 0);
+ cairo_line_to (cr, ph, get_height());