diff options
author | 2021-07-22 13:23:36 -0500 | |
---|---|---|
committer | 2021-07-22 13:23:36 -0500 | |
commit | e5010b8ab87b2e30feea366396bc060c8e793d8d (patch) | |
tree | 73738efeafd4cf4151a9adb7523a31c848fa0cae /winit | |
parent | a7d2834a6d15466eecca29bb6357d3539cb652cd (diff) | |
download | iced-e5010b8ab87b2e30feea366396bc060c8e793d8d.tar.gz iced-e5010b8ab87b2e30feea366396bc060c8e793d8d.tar.bz2 iced-e5010b8ab87b2e30feea366396bc060c8e793d8d.zip |
redo custom error for Compositor::draw()
Diffstat (limited to 'winit')
-rw-r--r-- | winit/src/application.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index b04fc609..1d32a5f3 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -391,16 +391,16 @@ async fn run_instance<A, E, C>( // Maybe we can use `ControlFlow::WaitUntil` for this. } Err(error) => match error { - window::CompositorDrawError::SwapchainOutdated(_) => { + // This is an unrecoverable error. + window::SwapChainError::OutOfMemory => { + panic!("{}", error); + } + _ => { debug.render_finished(); - // Swapchain is outdated. Try rendering again next frame. + // Try rendering again next frame. window.request_redraw(); } - window::CompositorDrawError::FatalSwapchainError(e) => { - // Fatal swapchain error. Rendering cannot continue. - panic!("{}", e); - } }, } } |