mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Minor optimization: avoid reallocating set of visible ID:s
This commit is contained in:
@@ -568,7 +568,8 @@ impl Areas {
|
|||||||
..
|
..
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
*visible_last_frame = std::mem::take(visible_current_frame);
|
std::mem::swap(visible_last_frame, visible_current_frame);
|
||||||
|
visible_current_frame.clear();
|
||||||
order.sort_by_key(|layer| (layer.order, wants_to_be_on_top.contains(layer)));
|
order.sort_by_key(|layer| (layer.order, wants_to_be_on_top.contains(layer)));
|
||||||
wants_to_be_on_top.clear();
|
wants_to_be_on_top.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user