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

Make glow Send + Sync again. (#3646)

* Reverts #3598
* Closes #3645
This commit is contained in:
Sebastian Urban
2023-12-04 15:58:05 +01:00
committed by GitHub
parent 84a6d6f2ab
commit 36c6b6304d
7 changed files with 14 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ pub(crate) struct WebPainterGlow {
}
impl WebPainterGlow {
pub fn gl(&self) -> &std::rc::Rc<glow::Context> {
pub fn gl(&self) -> &std::sync::Arc<glow::Context> {
self.painter.gl()
}
@@ -24,7 +24,8 @@ impl WebPainterGlow {
let (gl, shader_prefix) =
init_glow_context_from_canvas(&canvas, options.webgl_context_option)?;
let gl = std::rc::Rc::new(gl);
#[allow(clippy::arc_with_non_send_sync)]
let gl = std::sync::Arc::new(gl);
let painter = egui_glow::Painter::new(gl, shader_prefix, None)
.map_err(|err| format!("Error starting glow painter: {err}"))?;