diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-07-14 08:40:07 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2018-07-14 08:40:07 -0500 |
commit | 108162c757e922a4b3478a767ede28b12f3923a8 (patch) | |
tree | 5bf330220c09753aebde79a9b7b793268dda0337 /gtk2_ardour | |
parent | 92f480adab917e7f7ecca5657c4c728af70af69b (diff) |
Aborted attempt to further optimize the editor-summary. Commented for future generations.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_summary.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index 93c7494630..e7355b577c 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -307,6 +307,13 @@ EditorSummary::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle void EditorSummary::render_region (RegionView* r, cairo_t* cr, double y) const { + /*NOTE: you can optimize this operation by coalescing adjacent regions into a single line stroke. + * In a session with a single track ~1,000 regions, this reduced render time from 14ms to 11 ms. + * However, you lose a lot of visual information. The current method preserves a sense of separation between regions. + * The current method shows the current selection (red regions), which needs to be preserved if this is optimized. + * I think it's not worth it for now, but we might choose to revisit this someday. + */ + uint32_t const c = r->get_fill_color (); cairo_set_source_rgb (cr, UINT_RGBA_R (c) / 255.0, UINT_RGBA_G (c) / 255.0, UINT_RGBA_B (c) / 255.0); |