mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Use a ViewportIdSet
This commit is contained in:
@@ -1459,7 +1459,7 @@ impl Context {
|
||||
pub fn end_frame(&self) -> FullOutput {
|
||||
crate::profile_function!();
|
||||
|
||||
let mut viewports: Vec<ViewportId> = self.write(|ctx| {
|
||||
let mut viewports: ViewportIdSet = self.write(|ctx| {
|
||||
ctx.layer_rects_prev_frame.insert(
|
||||
ctx.viewport_id(),
|
||||
ctx.layer_rects_this_frame
|
||||
@@ -1468,7 +1468,7 @@ impl Context {
|
||||
);
|
||||
ctx.viewports.values().map(|vp| vp.id_pair.this).collect()
|
||||
});
|
||||
viewports.push(ViewportId::ROOT);
|
||||
viewports.insert(ViewportId::ROOT);
|
||||
|
||||
if self.input(|i| i.wants_repaint()) {
|
||||
self.request_repaint();
|
||||
|
||||
@@ -6,6 +6,7 @@ use crate::{
|
||||
area,
|
||||
window::{self, WindowInteraction},
|
||||
EventFilter, Id, IdMap, InputState, LayerId, Pos2, Rect, Style, ViewportId, ViewportIdMap,
|
||||
ViewportIdSet,
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -561,7 +562,7 @@ impl Memory {
|
||||
pub(crate) fn end_frame(
|
||||
&mut self,
|
||||
input: &InputState,
|
||||
viewports: &[ViewportId],
|
||||
viewports: &ViewportIdSet,
|
||||
used_ids: &IdMap<Rect>,
|
||||
) {
|
||||
self.caches.update();
|
||||
|
||||
Reference in New Issue
Block a user