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
Source§fn default() -> RepaintPolicy
fn default() -> RepaintPolicy
Static — the safe, cheap default for the common dialog/tooltip-over-still-content case.
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 ==.impl StructuralPartialEq for RepaintPolicy
Auto Trait Implementations§
impl Freeze for RepaintPolicy
impl RefUnwindSafe for RepaintPolicy
impl Send for RepaintPolicy
impl Sync for RepaintPolicy
impl Unpin for RepaintPolicy
impl UnsafeUnpin for RepaintPolicy
impl UnwindSafe for RepaintPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.