pub enum BackbufferMode {
Rgba,
LcdCoverage,
}Expand description
How a widget’s backbuffer stores pixels.
The choice controls what the framework allocates as the render
target during paint_subtree_backbuffered and how the cached
bitmap is composited back onto the parent.
Variants§
Rgba
8-bit straight-alpha RGBA. Standard Porter-Duff SRC_ALPHA, ONE_MINUS_SRC_ALPHA composite on blit. Works for any widget,
including ones with transparent areas. Text inside is grayscale
AA (no LCD subpixel).
LcdCoverage
3 bytes-per-pixel composited opaque RGB — no alpha channel.
Every fill (rects, strokes, text, etc.) inside the buffer goes
through the 3× horizontal supersample + 5-tap filter + per-channel
src-over pipeline described in lcd-subpixel-compositing.md.
The buffer is blitted as an opaque RGB texture.
Contract: the widget is responsible for painting content that covers its full bounds with opaque fills (starting with a bg rect). Uncovered pixels land as black on the parent because there is no alpha channel to carry “no paint here.”
Trait Implementations§
Source§impl Clone for BackbufferMode
impl Clone for BackbufferMode
Source§fn clone(&self) -> BackbufferMode
fn clone(&self) -> BackbufferMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more