pub struct RenderContext {
pub viewport_width: u32,
pub viewport_height: u32,
pub device_pixel_ratio: f32,
pub vsync_enabled: bool,
pub target_fps: u32,
/* private fields */
}
Expand description
Render context with performance optimizations
Fields§
§viewport_width: u32
Viewport dimensions
viewport_height: u32
§device_pixel_ratio: f32
Device pixel ratio for high-DPI displays
vsync_enabled: bool
Whether to enable vsync
target_fps: u32
Frame rate target
Implementations§
Source§impl RenderContext
impl RenderContext
Sourcepub fn mark_dirty(&mut self, component_id: ComponentId)
pub fn mark_dirty(&mut self, component_id: ComponentId)
Mark a component as dirty (needing re-render)
Sourcepub fn is_dirty(&self, component_id: ComponentId) -> bool
pub fn is_dirty(&self, component_id: ComponentId) -> bool
Check if a component is dirty
Sourcepub fn mark_clean(&mut self, component_id: ComponentId)
pub fn mark_clean(&mut self, component_id: ComponentId)
Clear dirty flag for a component
Sourcepub fn get_dirty_components(&self) -> Vec<ComponentId>
pub fn get_dirty_components(&self) -> Vec<ComponentId>
Get all dirty components
Sourcepub fn clear_all_dirty(&mut self)
pub fn clear_all_dirty(&mut self)
Clear all dirty flags
Trait Implementations§
Source§impl Debug for RenderContext
impl Debug for RenderContext
Source§impl Default for RenderContext
impl Default for RenderContext
Source§fn default() -> RenderContext
fn default() -> RenderContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderContext
impl RefUnwindSafe for RenderContext
impl Send for RenderContext
impl Sync for RenderContext
impl Unpin for RenderContext
impl UnwindSafe for RenderContext
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