Desktop: Switch to the latest unreleased version of Winit (#3177)

* Use unstable winit

* Improve

* Remove unnecessary heap indirection
This commit is contained in:
Timon
2025-09-17 05:16:11 -07:00
committed by Dennis Kobert
parent 4662cbbbc1
commit 3fe7c477e9
14 changed files with 567 additions and 527 deletions

View File

@@ -24,8 +24,8 @@ pub(crate) struct GraphicsState {
}
impl GraphicsState {
pub(crate) fn new(window: Arc<Window>, context: WgpuContext) -> Self {
let size = window.inner_size();
pub(crate) fn new(window: Arc<dyn Window>, context: WgpuContext) -> Self {
let size = window.surface_size();
let surface = context.instance.create_surface(window).unwrap();
@@ -232,7 +232,7 @@ impl GraphicsState {
self.bind_overlays_texture(texture);
}
pub(crate) fn render(&mut self, window: &Window) -> Result<(), wgpu::SurfaceError> {
pub(crate) fn render(&mut self, window: &dyn Window) -> Result<(), wgpu::SurfaceError> {
if let Some(scene) = self.overlays_scene.take() {
self.render_overlays(scene);
}