redo custom error for Compositor::draw()
This commit is contained in:
parent
a7d2834a6d
commit
e5010b8ab8
4 changed files with 62 additions and 55 deletions
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue