Struct cognitive_qualia::memory::Buffer [] [src]

pub struct Buffer { /* fields omitted */ }

Container for all data required to draw an image.

Methods

impl Buffer
[src]

Constructors Buffer.

Will panic if passed data size does not match declared size.

Constructs empty Buffer.

Copies data from other buffer to self.

Checks if buffer contains drawable data.

Converts Buffer to memory.

Applications share memory with server. It is their responsibility to inform server which buffer should be used and avoid drawing to it. The same way inner parts of compositor may want to instruct render to draw surfaces for them and for simplicity they do this in the same (relatively unsafe) way as clients. This method converts Buffer to Memory so it can be used just as mapped memory obtained from client. It is programmes responsibility to ensure Buffer exists until Memory exist and not to draw on it while it may be used for rendering.

Trait Implementations

impl Clone for Buffer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Buffer
[src]

Formats the value using the given formatter.

impl Image for Buffer
[src]

Get width and height of the image.

Return width of the image.

Returns height of the image.

impl Pixmap for Buffer
[src]

Returns pixel format of the pixmap.

Return stride (width in bytes or one row) of the pixmap.

Returns data as slice.

Returns data as mutable slice.

Returns data as pointer to u8.