image-copy: Hold references to Buffers to block release
The `wl_buffer` now won't be released until sync fence polls ready.
This commit is contained in:
parent
d84d5d46ce
commit
dd6ebd03c9
3 changed files with 103 additions and 43 deletions
|
|
@ -1674,7 +1674,7 @@ fn send_screencopy_result<'a>(
|
|||
pre_postprocess_data: &mut PrePostprocessData,
|
||||
tx: &std::sync::mpsc::Sender<PendingImageCopyData>,
|
||||
frame_result: &RenderFrameResult<GbmBuffer, GbmFramebuffer, CosmicElement<GlMultiRenderer<'a>>>,
|
||||
elements: &[CosmicElement<GlMultiRenderer>],
|
||||
elements: &[CosmicElement<GlMultiRenderer<'a>>],
|
||||
(session, frame, res): (
|
||||
&ScreencopySessionRef,
|
||||
ScreencopyFrame,
|
||||
|
|
@ -1855,6 +1855,8 @@ fn send_screencopy_result<'a>(
|
|||
transform,
|
||||
damage.as_deref(),
|
||||
sync,
|
||||
// Don't reference `Buffer`s since we blit from framebuffer/postprocess buffer
|
||||
vec![],
|
||||
)? {
|
||||
if frame_result.is_empty {
|
||||
data.frame
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue