Merge pull request #1000 from PolyMeilex/wgpu-0.10
wgpu: Update to 0.10
This commit is contained in:
commit
2d65621a3b
15 changed files with 123 additions and 120 deletions
|
|
@ -227,20 +227,19 @@ async fn run_instance<A, E, C>(
|
|||
use iced_futures::futures::stream::StreamExt;
|
||||
use winit::event;
|
||||
|
||||
let surface = compositor.create_surface(&window);
|
||||
let mut surface = compositor.create_surface(&window);
|
||||
let mut clipboard = Clipboard::connect(&window);
|
||||
|
||||
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,7 @@ async fn run_instance<A, E, C>(
|
|||
|
||||
match compositor.draw(
|
||||
&mut renderer,
|
||||
&mut swap_chain,
|
||||
&mut surface,
|
||||
state.viewport(),
|
||||
state.background_color(),
|
||||
&primitive,
|
||||
|
|
@ -393,7 +392,7 @@ async fn run_instance<A, E, C>(
|
|||
}
|
||||
Err(error) => match error {
|
||||
// This is an unrecoverable error.
|
||||
window::SwapChainError::OutOfMemory => {
|
||||
window::SurfaceError::OutOfMemory => {
|
||||
panic!("{}", error);
|
||||
}
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue