wp-presentation: implement version 2
This commit is contained in:
parent
de47705a32
commit
03dce4af06
8 changed files with 51 additions and 16 deletions
|
|
@ -55,7 +55,7 @@ use {
|
|||
zwlr_layer_surface_v1::{PendingLayerSurfaceData, ZwlrLayerSurfaceV1Error},
|
||||
},
|
||||
wp_content_type_v1::ContentType,
|
||||
wp_presentation_feedback::WpPresentationFeedback,
|
||||
wp_presentation_feedback::{WpPresentationFeedback, VRR_REFRESH_SINCE},
|
||||
zwp_linux_dmabuf_feedback_v1::ZwpLinuxDmabufFeedbackV1,
|
||||
},
|
||||
leaks::Tracker,
|
||||
|
|
@ -2135,6 +2135,7 @@ impl PresentationListener for WlSurface {
|
|||
refresh: u32,
|
||||
seq: u64,
|
||||
flags: u32,
|
||||
vrr: bool,
|
||||
) {
|
||||
let bindings = output.global.bindings.borrow();
|
||||
let bindings = bindings.get(&self.client.id);
|
||||
|
|
@ -2144,6 +2145,10 @@ impl PresentationListener for WlSurface {
|
|||
pf.send_sync_output(binding);
|
||||
}
|
||||
}
|
||||
let mut refresh = refresh;
|
||||
if vrr && pf.version < VRR_REFRESH_SINCE {
|
||||
refresh = 0;
|
||||
}
|
||||
pf.send_presented(tv_sec, tv_nsec, refresh, seq, flags);
|
||||
let _ = pf.client.remove_obj(&*pf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue