Struct smithay_client_toolkit::dmabuf::DmabufParams
source · pub struct DmabufParams {
params: ZwpLinuxBufferParamsV1,
}
Expand description
Builder for a dmabuf backed buffer
Fields§
§params: ZwpLinuxBufferParamsV1
Implementations§
source§impl DmabufParams
impl DmabufParams
sourcepub fn add(
&self,
fd: BorrowedFd<'_>,
plane_idx: u32,
offset: u32,
stride: u32,
modifier: u64,
)
pub fn add( &self, fd: BorrowedFd<'_>, plane_idx: u32, offset: u32, stride: u32, modifier: u64, )
Add a plane
In version 4
, it is a protocol error if format
/modifier
pair wasn’t
advertised as supported.
modifier
should be the same for all planes. It is a protocol error in version 5
if
they differ.
sourcepub fn create(
self,
width: i32,
height: i32,
format: u32,
flags: Flags,
) -> ZwpLinuxBufferParamsV1
pub fn create( self, width: i32, height: i32, format: u32, flags: Flags, ) -> ZwpLinuxBufferParamsV1
Create buffer.
DmabufHandler::created
or DmabufHandler::failed
will be invoked when the
operation succeeds or fails.
sourcepub fn create_immed<D>(
self,
width: i32,
height: i32,
format: u32,
flags: Flags,
qh: &QueueHandle<D>,
) -> (WlBuffer, ZwpLinuxBufferParamsV1)
pub fn create_immed<D>( self, width: i32, height: i32, format: u32, flags: Flags, qh: &QueueHandle<D>, ) -> (WlBuffer, ZwpLinuxBufferParamsV1)
Create buffer immediately.
On failure buffer is invalid, and server may raise protocol error or
send DmabufHandler::failed
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DmabufParams
impl !RefUnwindSafe for DmabufParams
impl Send for DmabufParams
impl Sync for DmabufParams
impl Unpin for DmabufParams
impl !UnwindSafe for DmabufParams
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.