kms: Dmabuf feedback support

This commit is contained in:
Victoria Brekenfeld 2023-03-31 13:57:37 +02:00
parent 636d38921a
commit bc49507353
8 changed files with 267 additions and 36 deletions

View file

@ -10,7 +10,10 @@ use smithay::{
calloop::RegistrationToken,
wayland_server::{backend::GlobalId, Client, DisplayHandle},
},
wayland::{dmabuf::DmabufGlobal, socket::ListeningSocketSource},
wayland::{
dmabuf::{DmabufFeedbackBuilder, DmabufGlobal},
socket::ListeningSocketSource,
},
xwayland::XWaylandClientData,
};
use std::sync::Arc;
@ -59,10 +62,14 @@ impl State {
false
};
let feedback = DmabufFeedbackBuilder::new(render_node.dev_id(), formats.clone())
.build()
.with_context(|| "Failed to create drm format shared memory table")?;
let dmabuf_global = self
.common
.dmabuf_state
.create_global_with_filter::<State, _>(dh, formats.clone(), filter);
.create_global_with_filter_and_default_feedback::<State, _>(dh, &feedback, filter);
let drm_global_id = self
.common