logo
pub struct RenderingMetricsCollector { /* private fields */ }
Expand description

Helper class that rendering backends can use to provide an FPS counter

Implementations

Returns a new instance of the counter if requested by the user (via SLINT_DEBUG_PERFORMANCE environment variable). The environment variable holds a comma separated list of options: * refresh_lazy: selects the lazy refresh mode, where measurements are only taken when a frame is rendered (due to user input or animations) * refresh_full_speed: frames are continuously rendered * console: the measurement is printed to the console * overlay: the measurement is drawn as overlay on top of the scene

Call this function if you want to start measurements. This will also print out some system information such as whether this is a debug or release build, as well as the provided winsys_info string.

Call this function every time you’ve completed the rendering of a frame. The rendere parameter is used to collect additional data and is used to render an overlay if enabled.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.