canvas: skip intermediate Canvas::Rect object (trivial optimization)

This commit is contained in:
Paul Davis 2023-09-15 09:58:59 -06:00
parent 55b862832a
commit 4c5c7769bb
1 changed files with 2 additions and 4 deletions

View File

@ -116,14 +116,12 @@ LineSet::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
}
self = item_to_window (self);
Rect isect = self.intersection (area);
Rect intersection = self.intersection (area);
if (!isect) {
if (!intersection) {
continue;
}
Rect intersection (isect);
Gtkmm2ext::set_source_rgba (context, l.color);
context->set_line_width (l.width);