diff options
| author | 2021-08-20 20:32:04 +0700 | |
|---|---|---|
| committer | 2021-08-20 20:32:04 +0700 | |
| commit | fe0de182c57e3a434026b1937b9a02597263afc3 (patch) | |
| tree | d0512e3eeef34312641c7795e3c2d761901d3c1c /winit | |
| parent | 8a7c91bcb2867e751819d780eb5c46546da18d9a (diff) | |
| download | iced-fe0de182c57e3a434026b1937b9a02597263afc3.tar.gz iced-fe0de182c57e3a434026b1937b9a02597263afc3.tar.bz2 iced-fe0de182c57e3a434026b1937b9a02597263afc3.zip | |
Remove `SwapChain` associated type from `Compositor`
Diffstat (limited to '')
| -rw-r--r-- | winit/src/application.rs | 20 | 
1 files changed, 9 insertions, 11 deletions
| diff --git a/winit/src/application.rs b/winit/src/application.rs index 0b0139e6..9a86644c 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -232,15 +232,14 @@ async fn run_instance<A, E, C>(      let mut state = State::new(&application, &window);      let mut viewport_version = state.viewport_version(); -    let mut swap_chain = { -        let physical_size = state.physical_size(); -        compositor.create_swap_chain( -            &surface, -            physical_size.width, -            physical_size.height, -        ) -    }; +    let physical_size = state.physical_size(); + +    compositor.configure_surface( +        &mut surface, +        physical_size.width, +        physical_size.height, +    );      let mut user_interface = ManuallyDrop::new(build_user_interface(          &mut application, @@ -358,8 +357,8 @@ async fn run_instance<A, E, C>(                          .draw(&mut renderer, state.cursor_position());                      debug.draw_finished(); -                    swap_chain = compositor.create_swap_chain( -                        &surface, +                    compositor.configure_surface( +                        &mut surface,                          physical_size.width,                          physical_size.height,                      ); @@ -369,7 +368,6 @@ async fn run_instance<A, E, C>(                  match compositor.draw(                      &mut renderer, -                    &mut swap_chain,                      &mut surface,                      state.viewport(),                      state.background_color(), | 
