13
0

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

View File

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