From 4e391013c8bf8544fb766bee5dbae10cfdbc9d93 Mon Sep 17 00:00:00 2001 From: Billy Messenger Date: Wed, 16 Dec 2020 10:03:51 -0600 Subject: don't panic when swapchain frame is outdated --- graphics/src/window/compositor.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'graphics/src') diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs index 0bc8cbc8..39485153 100644 --- a/graphics/src/window/compositor.rs +++ b/graphics/src/window/compositor.rs @@ -40,6 +40,9 @@ pub trait Compositor: Sized { /// Draws the output primitives to the next frame of the given [`SwapChain`]. /// + /// This will return an error if drawing could not be completed on this frame. + /// If an error occurs, try calling this again on the next frame. + /// /// [`SwapChain`]: Self::SwapChain fn draw>( &mut self, @@ -49,5 +52,5 @@ pub trait Compositor: Sized { background_color: Color, output: &::Output, overlay: &[T], - ) -> mouse::Interaction; + ) -> Result; } -- cgit