From e5010b8ab87b2e30feea366396bc060c8e793d8d Mon Sep 17 00:00:00 2001 From: Billy Messenger Date: Thu, 22 Jul 2021 13:23:36 -0500 Subject: redo custom error for Compositor::draw() --- winit/src/application.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winit') 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( // 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); - } }, } } -- cgit