WlBufferHandler

Trait WlBufferHandler 

Source
pub trait WlBufferHandler: Any {
    // Provided methods
    fn delete_id(&mut self, slf: &Rc<WlBuffer>) { ... }
    fn handle_destroy(&mut self, slf: &Rc<WlBuffer>) { ... }
    fn handle_release(&mut self, slf: &Rc<WlBuffer>) { ... }
}
Expand description

A message handler for WlBuffer proxies.

Provided Methods§

Source

fn delete_id(&mut self, slf: &Rc<WlBuffer>)

Event handler for wl_display.delete_id messages deleting the ID of this object.

The default handler forwards the event to the client, if any.

Source

fn handle_destroy(&mut self, slf: &Rc<WlBuffer>)

destroy a buffer

Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface.

For possible side-effects to a surface, see wl_surface.attach.

Source

fn handle_release(&mut self, slf: &Rc<WlBuffer>)

compositor releases buffer

Sent when this wl_buffer is no longer used by the compositor.

For more information on when release events may or may not be sent, and what consequences it has, please see the description of wl_surface.attach.

If a client receives a release event before the frame callback requested in the same wl_surface.commit that attaches this wl_buffer to a surface, then the client is immediately free to reuse the buffer and its backing storage, and does not need a second buffer for the next surface content update. Typically this is possible, when the compositor maintains a copy of the wl_surface contents, e.g. as a GL texture. This is an important optimization for GL(ES) compositors with wl_shm clients.

Implementors§