summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/window/compositor.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs
index 7d5d789b..7342245c 100644
--- a/graphics/src/window/compositor.rs
+++ b/graphics/src/window/compositor.rs
@@ -43,6 +43,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<T: AsRef<str>>(
&mut self,
@@ -52,5 +55,5 @@ pub trait Compositor: Sized {
background_color: Color,
output: &<Self::Renderer as iced_native::Renderer>::Output,
overlay: &[T],
- ) -> mouse::Interaction;
+ ) -> Result<mouse::Interaction, ()>;
}