Trait smithay::backend::renderer::ImportDma[][src]

pub trait ImportDma: Renderer {
    fn import_dmabuf(
        &mut self,
        dmabuf: &Dmabuf
    ) -> Result<<Self as Renderer>::TextureId, <Self as Renderer>::Error>; fn dmabuf_formats<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Format> + 'a> { ... }
fn import_dma_buffer(
        &mut self,
        buffer: &WlBuffer
    ) -> Result<<Self as Renderer>::TextureId, <Self as Renderer>::Error> { ... } }
Expand description

Trait for Renderers supporting importing dmabuf-based buffers.

Required methods

Import a given raw dmabuf into the renderer.

Returns a texture_id, which can be used with Frame::render_texture (or Frame::render_texture_at) or implementation-specific functions.

If not otherwise defined by the implementation, this texture id is only valid for the renderer, that created it.

This operation needs no bound or default rendering target.

The implementation defines, if the id keeps being valid, if the buffer is released, to avoid relying on implementation details, keep the buffer alive, until you destroyed this texture again.

Provided methods

Returns supported formats for dmabufs.

Import a given dmabuf-based buffer into the renderer (see buffer_type).

Returns a texture_id, which can be used with Frame::render_texture (or Frame::render_texture_at) or implementation-specific functions.

If not otherwise defined by the implementation, this texture id is only valid for the renderer, that created it.

This operation needs no bound or default rendering target.

The implementation defines, if the id keeps being valid, if the buffer is released, to avoid relying on implementation details, keep the buffer alive, until you destroyed this texture again.

Implementors