pub trait DisplayPartial<const BITS: usize, const FRAMES: usize, SPI: SpiDevice, ERROR>: DisplaySimple<BITS, FRAMES, SPI, ERROR> {
// Required method
async fn write_base_framebuffer(
&mut self,
spi: &mut SPI,
buf: &dyn BufferView<BITS, FRAMES>,
) -> Result<(), ERROR>;
}
Expand description
Displays that support a partial update, where a “diff” framebuffer is diffed against a base framebuffer, and only the changed pixels from the diff are actually updated.
Required Methods§
Sourceasync fn write_base_framebuffer(
&mut self,
spi: &mut SPI,
buf: &dyn BufferView<BITS, FRAMES>,
) -> Result<(), ERROR>
async fn write_base_framebuffer( &mut self, spi: &mut SPI, buf: &dyn BufferView<BITS, FRAMES>, ) -> Result<(), ERROR>
Writes the buffer to the base framebuffer that the main framebuffer layer (written with DisplaySimple::write_framebuffer) will be diffed against. Only pixels that differ will be updated.
For standard use, you probably only need to call this once before the first partial display, as the main framebuffer becomes the diff base after a call to Displayable::update_display.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.