pub struct FrameTimeGraph { /* private fields */ }Expand description
Represents a simple time graph for diagnostics purpose, used to show layout and render times.
Implementations§
Source§impl FrameTimeGraph
impl FrameTimeGraph
pub fn size(&self) -> Size
Sourcepub fn new(
max_frames: i32,
size: Size,
default_max_y: f64,
title: &str,
text_renderer: Rc<DiagnosticTextRenderer>,
) -> Self
pub fn new( max_frames: i32, size: Size, default_max_y: f64, title: &str, text_renderer: Rc<DiagnosticTextRenderer>, ) -> Self
Creates a graph using the platform render interface registered in the service locator.
Sourcepub fn with_render_interface(
render_interface: impl Into<GraphRenderInterface>,
max_frames: i32,
size: Size,
default_max_y: f64,
title: &str,
text_renderer: Rc<DiagnosticTextRenderer>,
) -> Self
pub fn with_render_interface( render_interface: impl Into<GraphRenderInterface>, max_frames: i32, size: Size, default_max_y: f64, title: &str, text_renderer: Rc<DiagnosticTextRenderer>, ) -> Self
Creates a graph that builds its geometry with render_interface
instead of looking the render interface up in the service locator.
pub fn add_frame_value(&self, value: f64)
pub fn reset(&self)
Sourcepub fn render(&self, context: &mut dyn IDrawingContextImpl)
pub fn render(&self, context: &mut dyn IDrawingContextImpl)
Draws the graph at the origin of the current transform of context.
Auto Trait Implementations§
impl !Freeze for FrameTimeGraph
impl !RefUnwindSafe for FrameTimeGraph
impl !Send for FrameTimeGraph
impl !Sync for FrameTimeGraph
impl !UnwindSafe for FrameTimeGraph
impl Unpin for FrameTimeGraph
impl UnsafeUnpin for FrameTimeGraph
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more