From a7d2834a6d15466eecca29bb6357d3539cb652cd Mon Sep 17 00:00:00 2001 From: Billy Messenger Date: Thu, 22 Jul 2021 13:08:13 -0500 Subject: add custom error for Compositor::draw() --- examples/integration/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/integration') diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs index ab0e2299..9ef31203 100644 --- a/examples/integration/src/main.rs +++ b/examples/integration/src/main.rs @@ -220,11 +220,13 @@ pub fn main() { local_pool.run_until_stalled(); } Err(error) => match error { - wgpu::SwapChainError::Outdated => { + wgpu::SwapChainError::OutOfMemory => { + panic!("Swapchain error: {}. Rendering cannot continue.", error) + } + _ => { // Try rendering again next frame. window.request_redraw(); } - _ => panic!("Swapchain error: {:?}", error), }, } } -- cgit