backend: Make SwapBuffersError Send+Sync

This makes using anyhow with Smithay easier.
This commit is contained in:
Victor Berger 2021-12-29 16:07:58 +01:00 committed by Victor Berger
parent 35c9e02b0d
commit c232b5c108
1 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ pub enum SwapBuffersError {
/// Operations will have no effect. Functions that read textures, buffers, etc. /// Operations will have no effect. Functions that read textures, buffers, etc.
/// will return uninitialized data instead. /// will return uninitialized data instead.
#[error("The context has been lost, it needs to be recreated: {0}")] #[error("The context has been lost, it needs to be recreated: {0}")]
ContextLost(Box<dyn std::error::Error>), ContextLost(Box<dyn std::error::Error + Send + Sync>),
/// A temporary condition caused to rendering to fail. /// A temporary condition caused to rendering to fail.
/// ///
/// Depending on the underlying error this *might* require fixing internal state of the rendering backend, /// Depending on the underlying error this *might* require fixing internal state of the rendering backend,
@ -126,5 +126,5 @@ pub enum SwapBuffersError {
/// If the root cause cannot be discovered and subsequent renderings also fail, it is advised to fallback to /// If the root cause cannot be discovered and subsequent renderings also fail, it is advised to fallback to
/// recreation. /// recreation.
#[error("A temporary condition caused the page flip to fail: {0}")] #[error("A temporary condition caused the page flip to fail: {0}")]
TemporaryFailure(Box<dyn std::error::Error>), TemporaryFailure(Box<dyn std::error::Error + Send + Sync>),
} }