Struct CompositeRenderer

Source
pub struct CompositeRenderer {
    pub renderer_2d: Box<dyn Renderer>,
    pub renderer_3d: Box<dyn Renderer>,
    /* private fields */
}
Expand description

Enhanced renderer composition for hybrid UIs with performance monitoring

Fields§

§renderer_2d: Box<dyn Renderer>

The 2D renderer (usually Skia)

§renderer_3d: Box<dyn Renderer>

The 3D renderer (usually WGPU)

Implementations§

Source§

impl CompositeRenderer

Source

pub fn new( renderer_2d: Box<dyn Renderer>, renderer_3d: Box<dyn Renderer>, ) -> Self

Create a new composite renderer with the specified renderers

Source

pub fn create_default() -> Result<Self, Error>

Create a default composite renderer

Trait Implementations§

Source§

impl Renderer for CompositeRenderer

Source§

fn render( &mut self, root: &Node, context: &mut RenderContext, ) -> Result<(), Error>

Render a component tree with context and performance optimizations
Source§

fn render_selective( &mut self, root: &Node, context: &mut RenderContext, dirty_components: &[ComponentId], ) -> Result<(), Error>

Render only dirty components for performance
Source§

fn name(&self) -> &str

Get the renderer name
Source§

fn get_stats(&self) -> RenderStats

Get render statistics
Source§

fn reset_stats(&mut self)

Reset render statistics
Source§

fn set_quality_level(&mut self, level: QualityLevel) -> Result<(), Error>

Set render quality/performance level
Source§

fn init(&mut self) -> Result<(), Error>

Initialize the renderer
Source§

fn flush(&mut self) -> Result<(), Error>

Flush any pending operations
Source§

fn cleanup(&mut self) -> Result<(), Error>

Clean up resources

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.