From fe0de182c57e3a434026b1937b9a02597263afc3 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 20 Aug 2021 20:32:04 +0700 Subject: Remove `SwapChain` associated type from `Compositor` --- wgpu/src/window/compositor.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'wgpu') diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index 0e4a014a..2aa703e7 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -88,7 +88,6 @@ impl iced_graphics::window::Compositor for Compositor { type Settings = Settings; type Renderer = Renderer; type Surface = wgpu::Surface; - type SwapChain = (); fn new( settings: Self::Settings, @@ -115,12 +114,12 @@ impl iced_graphics::window::Compositor for Compositor { } } - fn create_swap_chain( + fn configure_surface( &mut self, - surface: &Self::Surface, + surface: &mut Self::Surface, width: u32, height: u32, - ) -> Self::SwapChain { + ) { surface.configure( &self.device, &wgpu::SurfaceConfiguration { @@ -130,13 +129,12 @@ impl iced_graphics::window::Compositor for Compositor { width, height, }, - ) + ); } fn draw>( &mut self, renderer: &mut Self::Renderer, - _swap_chain: &mut Self::SwapChain, surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, -- cgit