pub struct PrepareTimings {
pub layout: Duration,
pub layout_intrinsic_cache: LayoutIntrinsicCacheStats,
pub layout_prune: LayoutPruneStats,
pub draw_ops: Duration,
pub draw_ops_culled_text_ops: u64,
pub paint: Duration,
pub paint_culled_ops: u64,
pub gpu_upload: Duration,
pub snapshot: Duration,
pub text_layout_cache: TextLayoutCacheStats,
}Expand description
Per-stage CPU timing inside each backend’s prepare. Cheap to
compute (a handful of Instant::now() calls per frame) and useful
for finding the dominant cost when frame budget is tight.
Stages:
layout: layout pass + focus order sync + state apply + animation tick.draw_ops: tree → DrawOp[] resolution.paint: paint-stream loop (quad packing + text shaping via cosmic-text).gpu_upload: backend-side instance buffer write + atlas flush + frame uniforms.snapshot: cloning the laid-out tree for next-frame hit-testing.
Fields§
§layout: Duration§layout_intrinsic_cache: LayoutIntrinsicCacheStats§layout_prune: LayoutPruneStats§draw_ops: Duration§draw_ops_culled_text_ops: u64§paint: Duration§paint_culled_ops: u64§gpu_upload: Duration§snapshot: Duration§text_layout_cache: TextLayoutCacheStatsTrait Implementations§
Source§impl Clone for PrepareTimings
impl Clone for PrepareTimings
Source§fn clone(&self) -> PrepareTimings
fn clone(&self) -> PrepareTimings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrepareTimings
impl Debug for PrepareTimings
Source§impl Default for PrepareTimings
impl Default for PrepareTimings
Source§fn default() -> PrepareTimings
fn default() -> PrepareTimings
Returns the “default value” for a type. Read more
impl Copy for PrepareTimings
Auto Trait Implementations§
impl Freeze for PrepareTimings
impl RefUnwindSafe for PrepareTimings
impl Send for PrepareTimings
impl Sync for PrepareTimings
impl Unpin for PrepareTimings
impl UnsafeUnpin for PrepareTimings
impl UnwindSafe for PrepareTimings
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.