smithay::backend::allocator

Trait Allocator

Source
pub trait Allocator<B: Buffer> {
    type Error: Error;

    // Required method
    fn create_buffer(
        &mut self,
        width: u32,
        height: u32,
        fourcc: Fourcc,
        modifiers: &[Modifier],
    ) -> Result<B, Self::Error>;
}
Expand description

Interface to create Buffers

Required Associated Types§

Source

type Error: Error

Error type thrown if allocations fail

Required Methods§

Source

fn create_buffer( &mut self, width: u32, height: u32, fourcc: Fourcc, modifiers: &[Modifier], ) -> Result<B, Self::Error>

Try to create a buffer with the given dimensions and pixel format

Implementors§