pub enum RepaintPolicy {
Static,
Live,
Bounded(Duration),
}Expand description
How often the frosted surface’s backdrop must be re-grabbed and re-blurred. The adapter —
not core — drives the host’s request_repaint from this; core only names the obligation.
Variants§
Static
The backdrop is over still content (dialog, tooltip): grab once, never refresh. The default — cheapest, and correct whenever the content behind the surface is static.
Static means the adapter does not drive repaints for this surface — not that the
surface stops compositing. If the host repaints for any other reason (input, animation
elsewhere, another surface’s Live), the frost still re-grabs and re-composites that frame.
It is “don’t request frames,” not “don’t paint.”
Live
The backdrop is over animating content: refresh every frame. Names an idle-power cost and is required for glass over moving content (otherwise the blur goes stale).
Bounded(Duration)
Refresh periodically — for content that changes on a known cadence.
Trait Implementations§
Source§impl Clone for RepaintPolicy
impl Clone for RepaintPolicy
Source§fn clone(&self) -> RepaintPolicy
fn clone(&self) -> RepaintPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RepaintPolicy
Source§impl Debug for RepaintPolicy
impl Debug for RepaintPolicy
Source§impl Default for RepaintPolicy
impl Default for RepaintPolicy
impl Eq for RepaintPolicy
Source§impl PartialEq for RepaintPolicy
impl PartialEq for RepaintPolicy
Source§fn eq(&self, other: &RepaintPolicy) -> bool
fn eq(&self, other: &RepaintPolicy) -> bool
self and other values to be equal, and is used by ==.