Skip to content

Commit abeea78

Browse files
committed
clip widgets whose layout rect doesn't intersect with the current clip rect
1 parent 9dd697a commit abeea78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/yakui-core/src/paint/paint_dom.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ impl PaintDom {
9696
profiling::scope!("PaintDom::paint");
9797

9898
let layout_node = layout.get(id).unwrap();
99+
if !layout_node.clip.intersects(&layout_node.rect) {
100+
return;
101+
}
102+
99103
self.current_clip = Rect::from_pos_size(
100104
(layout_node.clip.pos() * self.scale_factor).round(),
101105
(layout_node.clip.size() * self.scale_factor).round(),

0 commit comments

Comments
 (0)