pub trait BufferLike: EventSource<BufferEvent> + Debug + 'static {
    // Required methods
    fn damage(&self);
    fn clear_damage(&self);
    fn get_damage(&self) -> bool;
    fn dimension(&self) -> Extent<u32, Buffer>;
    fn object_id(&self) -> u32;
    fn release(&self);
    fn acquire(&self);
}
Expand description

The base buffer trait.

Required Methods§

source

fn damage(&self)

Damage the buffer

source

fn clear_damage(&self)

Clear buffer damage

source

fn get_damage(&self) -> bool

Returns whether the buffer is damaged

source

fn dimension(&self) -> Extent<u32, Buffer>

The buffer dimensions

source

fn object_id(&self) -> u32

Return the object id for the buffer object. Used for sending release event to the client.

source

fn release(&self)

Send the Released event for this buffer. After this is called, the buffer should prevent any further access of the client resources. Repeated calls to this function without intervening calls to BufferLike::acquire are allowed, but should have no effect.

When a buffer is just created, it is in the released state.

source

fn acquire(&self)

Acquire the buffer so it can be read.

Implementors§

source§

impl<B: BufferLike, Data: Debug + 'static> BufferLike for UserBuffer<B, Data>

source§

impl<Base: Debug + 'static> BufferLike for Buffer<Base>