pub struct PerformanceManager { /* private fields */ }Expand description
Performance optimization manager
Implementations§
Source§impl PerformanceManager
impl PerformanceManager
pub fn new(settings: PerformanceSettings) -> Self
pub fn start_frame(&mut self)
pub fn end_frame(&mut self)
pub fn should_render_node( &self, position: Position, size: (f64, f64), viewport: &Viewport, ) -> bool
pub fn should_render_edge( &self, source_pos: Position, target_pos: Position, viewport: &Viewport, ) -> bool
pub fn add_node_to_batch(&mut self, node: BatchedNode)
pub fn add_edge_to_batch(&mut self, edge: BatchedEdge)
pub fn get_render_batch(&mut self) -> &mut RenderBatch
pub fn get_performance_stats(&self) -> &RenderStats
pub fn update_settings(&mut self, settings: PerformanceSettings)
pub fn is_performance_good(&self) -> bool
pub fn get_fps(&self) -> f64
Auto Trait Implementations§
impl Freeze for PerformanceManager
impl RefUnwindSafe for PerformanceManager
impl Send for PerformanceManager
impl Sync for PerformanceManager
impl Unpin for PerformanceManager
impl UnwindSafe for PerformanceManager
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