pub trait FrameBuffer {
// Required methods
fn get_word_size(&self) -> WordSize;
fn plane_count(&self) -> usize;
fn plane_ptr_len(&self, plane_idx: usize) -> (*const u8, usize);
}Expand description
Trait for read-only framebuffers.
Required Methods§
Sourcefn get_word_size(&self) -> WordSize
fn get_word_size(&self) -> WordSize
Returns the word size configuration for this framebuffer
Sourcefn plane_count(&self) -> usize
fn plane_count(&self) -> usize
Returns the number of BCM bit-planes in this framebuffer.
Contiguous (threshold-based) framebuffers return 1 — the entire
buffer is treated as a single plane. True bit-plane framebuffers
return the number of planes (typically equal to the colour depth in
bits).
Sourcefn plane_ptr_len(&self, plane_idx: usize) -> (*const u8, usize)
fn plane_ptr_len(&self, plane_idx: usize) -> (*const u8, usize)
Returns a raw pointer and byte length for the given plane.
For a single-plane framebuffer (plane_count() == 1), plane_idx
must be 0 and the returned span covers the whole DMA-ready buffer.
§Panics
May panic if plane_idx >= plane_count().