From f2813f0500c6af8cb1fd804c520d181607c17938 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Wed, 20 Aug 2025 15:34:07 -0700 Subject: [PATCH] screencopy: Return signalled sync point after shm Shouldn't really matter, but no need to check the fence after this. It would be good if shm screencopy didn't block here... --- src/wayland/handlers/screencopy/render.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wayland/handlers/screencopy/render.rs b/src/wayland/handlers/screencopy/render.rs index 754c5519..452e0072 100644 --- a/src/wayland/handlers/screencopy/render.rs +++ b/src/wayland/handlers/screencopy/render.rs @@ -100,7 +100,7 @@ pub fn submit_buffer( offscreen: Option<&mut R::Framebuffer<'_>>, transform: Transform, damage: Option<&[Rectangle]>, - sync: SyncPoint, + mut sync: SyncPoint, ) -> Result, R::Error> where R: ExportMem, @@ -154,6 +154,11 @@ where ); } } + + // We've already waited on the sync point and copied from the texture + // TODO: Don't block in this function, and defer copy until ready? + sync = SyncPoint::signaled(); + Ok(()) }) .map_err(|err| R::Error::from_gles_error(GlesError::BufferAccessError(err)))