pub enum TickClass {
CosmeticLoop,
Transition,
}Expand description
The class of a continuation-frame request a widget makes during paint —
how urgent the next frame is, so the mobile frame gate can decide whether it
may be paced (see crate::app::RenderRoot::paint and the frame gate).
A widget continues an animation by asking for another frame during paint
(PaintCtx::request_frame / PaintCtx::request_frame_paced); this tag
says whether that next frame is user-visible motion that must land on the
very next vsync (TickClass::Transition) or a decorative loop whose cadence
can be throttled without a perceptible glitch (TickClass::CosmeticLoop).
Aggregation is a max-lattice: Transition dominates CosmeticLoop. Over
a whole paint pass, ANY TickClass::Transition request makes the frame
unpaced (must run every vsync, today’s behavior); only when every request
this frame is TickClass::CosmeticLoop may the gate pace it. No request at
all leaves the frame as it is today — the class is only meaningful once a
frame was actually requested (see PaintCtx::frame_class).
A CosmeticLoop request may additionally name how often it wants to be
re-run (PaintCtx::request_frame_paced_at); those intervals aggregate on
their own MIN-lattice, orthogonal to this max-lattice over classes (see
PaintCtx::paced_interval).
The gate-side pacing behavior is implemented separately (the mobile frame gate); this type is only the vocabulary a widget uses to declare intent.
Variants§
CosmeticLoop
A pacable decorative loop (e.g. a skeleton shimmer, an idle pulse) — the
gate may throttle its cadence when this is the only class requested
this frame. Never dominates a concurrent TickClass::Transition.
Transition
User-visible motion that must reproduce every vsync — a page transition,
a fling, a caret blink, a layout animation. Today’s request_frame
behavior, and the dominant class in the aggregation above.
Trait Implementations§
impl Copy for TickClass
impl Eq for TickClass
impl StructuralPartialEq for TickClass
Auto Trait Implementations§
impl Freeze for TickClass
impl RefUnwindSafe for TickClass
impl Send for TickClass
impl Sync for TickClass
impl Unpin for TickClass
impl UnsafeUnpin for TickClass
impl UnwindSafe for TickClass
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.