pub struct FrameSample {
pub update: Duration,
pub acquire: Duration,
pub render: Duration,
pub present: Duration,
pub quads: usize,
pub glyphs: usize,
pub draw_calls: usize,
pub size: (u32, u32),
pub scale: f32,
pub work: FrameWork,
pub render_work: RenderWork,
}Expand description
What one frame cost. All durations are time on the CPU: waiting for a busy
GPU shows up in Self::acquire and Self::present, not in Self::render.
Fields§
§update: DurationRebuilding, laying out and painting the UI.
acquire: DurationWaiting for a texture to draw on, which vsync and a busy GPU make longer.
render: DurationRecording and submitting the GPU’s work.
present: DurationHanding the texture to the window system.
quads: usizeQuads drawn.
glyphs: usizeGlyphs drawn.
draw_calls: usizeDraw calls issued.
size: (u32, u32)The drawing surface in physical pixels.
scale: f32Physical pixels per logical pixel.
work: FrameWorkWhat the UI runtime did.
render_work: RenderWorkWhat the renderer did.
Implementations§
Trait Implementations§
Source§impl Clone for FrameSample
impl Clone for FrameSample
Source§fn clone(&self) -> FrameSample
fn clone(&self) -> FrameSample
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 moreimpl Copy for FrameSample
Source§impl Debug for FrameSample
impl Debug for FrameSample
Source§impl Default for FrameSample
impl Default for FrameSample
Source§fn default() -> FrameSample
fn default() -> FrameSample
Returns the “default value” for a type. Read more
Source§impl PartialEq for FrameSample
impl PartialEq for FrameSample
impl StructuralPartialEq for FrameSample
Auto Trait Implementations§
impl Freeze for FrameSample
impl RefUnwindSafe for FrameSample
impl Send for FrameSample
impl Sync for FrameSample
impl Unpin for FrameSample
impl UnsafeUnpin for FrameSample
impl UnwindSafe for FrameSample
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