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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackbufferMode
impl Debug for BackbufferMode
Source§impl PartialEq for BackbufferMode
impl PartialEq for BackbufferMode
Source§fn eq(&self, other: &BackbufferMode) -> bool
fn eq(&self, other: &BackbufferMode) -> bool
self and other values to be equal, and is used by ==.impl Copy for BackbufferMode
impl Eq for BackbufferMode
impl StructuralPartialEq for BackbufferMode
Auto Trait Implementations§
impl Freeze for BackbufferMode
impl RefUnwindSafe for BackbufferMode
impl Send for BackbufferMode
impl Sync for BackbufferMode
impl Unpin for BackbufferMode
impl UnsafeUnpin for BackbufferMode
impl UnwindSafe for BackbufferMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more