Enum cognitive_qualia::surface::DataSource [] [src]

pub enum DataSource {
    Shm {
        source: MemoryView,
        time_stamp: Instant,
    },
    EglImage {
        source: EglAttributes,
        time_stamp: Instant,
    },
    Dmabuf {
        source: DmabufAttributes,
        time_stamp: Instant,
    },
    None,
}

This enum gathers information about source of data to be used when drawing surface.

Must be easy to copy and ensure data is not destroyed during use.

Variants

View on shared memory pool or buffer.

Fields of Shm

EGL image stored in graphic card memory.

Fields of EglImage

Image stored in some graphic device (webcam, GPU, etc...).

Fields of Dmabuf

Source unspecified.

Methods

impl DataSource
[src]

Constructs new shared memory DataSource.

Constructs new EGL image DataSource.

Constructs new dmabuf DataSource.

Returns true if data source is unspecified, false otherwise.

Returns data as Image if available.

Trait Implementations

impl Clone for DataSource
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more