feat(wayland): dmabuf
This commit is contained in:
22
src/wayland/dmabuf.rs
Normal file
22
src/wayland/dmabuf.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use super::state::WaylandState;
|
||||
use smithay::{
|
||||
backend::allocator::dmabuf::Dmabuf,
|
||||
delegate_dmabuf,
|
||||
wayland::dmabuf::{self, DmabufGlobal, DmabufHandler, DmabufState},
|
||||
};
|
||||
|
||||
impl DmabufHandler for WaylandState {
|
||||
fn dmabuf_state(&mut self) -> &mut DmabufState {
|
||||
&mut self.dmabuf_state
|
||||
}
|
||||
|
||||
fn dmabuf_imported(
|
||||
&mut self,
|
||||
_global: &DmabufGlobal,
|
||||
dmabuf: Dmabuf,
|
||||
) -> Result<(), dmabuf::ImportError> {
|
||||
self.pending_dmabufs.push(dmabuf);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
delegate_dmabuf!(WaylandState);
|
||||
Reference in New Issue
Block a user