mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Less RefCell in parameters
This commit is contained in:
@@ -1953,7 +1953,7 @@ mod wgpu_integration {
|
|||||||
&mut running.windows_id.borrow_mut(),
|
&mut running.windows_id.borrow_mut(),
|
||||||
&mut running.painter.borrow_mut(),
|
&mut running.painter.borrow_mut(),
|
||||||
window,
|
window,
|
||||||
state,
|
&mut state.borrow_mut(),
|
||||||
event_loop,
|
event_loop,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1965,7 +1965,7 @@ mod wgpu_integration {
|
|||||||
windows_id: &mut HashMap<winit::window::WindowId, ViewportId>,
|
windows_id: &mut HashMap<winit::window::WindowId, ViewportId>,
|
||||||
painter: &mut egui_wgpu::winit::Painter,
|
painter: &mut egui_wgpu::winit::Painter,
|
||||||
window: &mut Option<Rc<RefCell<winit::window::Window>>>,
|
window: &mut Option<Rc<RefCell<winit::window::Window>>>,
|
||||||
state: &RefCell<Option<egui_winit::State>>,
|
state: &mut Option<egui_winit::State>,
|
||||||
event_loop: &EventLoopWindowTarget<UserEvent>,
|
event_loop: &EventLoopWindowTarget<UserEvent>,
|
||||||
) {
|
) {
|
||||||
if let Ok(new_window) = create_winit_window_builder(builder).build(event_loop) {
|
if let Ok(new_window) = create_winit_window_builder(builder).build(event_loop) {
|
||||||
@@ -1975,7 +1975,7 @@ mod wgpu_integration {
|
|||||||
log::error!("on set_window: viewport_id {id} {err}");
|
log::error!("on set_window: viewport_id {id} {err}");
|
||||||
}
|
}
|
||||||
*window = Some(Rc::new(RefCell::new(new_window)));
|
*window = Some(Rc::new(RefCell::new(new_window)));
|
||||||
*state.borrow_mut() = Some(egui_winit::State::new(event_loop));
|
*state = Some(egui_winit::State::new(event_loop));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2210,7 +2210,7 @@ mod wgpu_integration {
|
|||||||
&mut c_windows_id.borrow_mut(),
|
&mut c_windows_id.borrow_mut(),
|
||||||
c_painter,
|
c_painter,
|
||||||
window,
|
window,
|
||||||
state,
|
&mut state.borrow_mut(),
|
||||||
event_loop,
|
event_loop,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user