1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

* Fix posibile deadlock when sending a viewport command from a sync viewport

* Improve viewports example
This commit is contained in:
Konkitoman
2023-09-06 16:30:20 +03:00
parent b1189c14ae
commit fb80880ff8
3 changed files with 59 additions and 21 deletions

View File

@@ -1030,8 +1030,6 @@ mod glow_integration {
let _painter = painter.clone();
let time = integration.beginning;
let focused = self.is_focused.clone();
// ## Sync Rendering
integration.egui_ctx.set_render_sync_callback(
move |viewport_builder, viewport_id, parent_id, render| {
@@ -1129,17 +1127,6 @@ mod glow_integration {
break 'try_render;
}
}
egui_winit::process_viewports_commands(
output.viewport_commands,
*focused.read(),
|id| {
glutin
.read()
.windows
.get(&id)
.and_then(|w| w.read().window.clone())
},
);
}
}
},
@@ -2124,12 +2111,6 @@ mod wgpu_integration {
break 'try_render;
}
}
egui_winit::process_viewports_commands(
output.viewport_commands,
*focused.read(),
|id| _windows.read().get(&id).and_then(|w| w.window.clone()),
);
}
}
},