diff options
author | 2021-08-20 20:32:04 +0700 | |
---|---|---|
committer | 2021-08-20 20:32:04 +0700 | |
commit | fe0de182c57e3a434026b1937b9a02597263afc3 (patch) | |
tree | d0512e3eeef34312641c7795e3c2d761901d3c1c /wgpu | |
parent | 8a7c91bcb2867e751819d780eb5c46546da18d9a (diff) | |
download | iced-fe0de182c57e3a434026b1937b9a02597263afc3.tar.gz iced-fe0de182c57e3a434026b1937b9a02597263afc3.tar.bz2 iced-fe0de182c57e3a434026b1937b9a02597263afc3.zip |
Remove `SwapChain` associated type from `Compositor`
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/window/compositor.rs | 10 |
1 files changed, 4 insertions, 6 deletions
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<W: HasRawWindowHandle>( 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<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, - _swap_chain: &mut Self::SwapChain, surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, |