Trait zng_view::extensions::RendererExtension

source ·
pub trait RendererExtension: Any {
Show 15 methods // Required methods fn is_init_only(&self) -> bool; fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; // Provided methods fn configure(&mut self, args: &mut RendererConfigArgs<'_>) { ... } fn renderer_inited(&mut self, args: &mut RendererInitedArgs<'_>) { ... } fn command( &mut self, args: &mut RendererCommandArgs<'_>, ) -> ApiExtensionPayload { ... } fn render_start(&mut self, args: &mut RenderArgs<'_>) { ... } fn render_push(&mut self, args: &mut RenderItemArgs<'_>) { ... } fn render_pop(&mut self, args: &mut RenderItemArgs<'_>) { ... } fn render_end(&mut self, args: &mut RenderArgs<'_>) { ... } fn render_update(&mut self, args: &mut RenderUpdateArgs<'_>) { ... } fn frame_ready(&mut self, args: &mut FrameReadyArgs) { ... } fn redraw(&mut self, args: &mut RedrawArgs<'_>) { ... } fn low_memory(&mut self) { ... } fn renderer_deinited(&mut self, args: &mut RendererDeinitedArgs<'_>) { ... }
}
Expand description

Represents a view extension associated with a renderer instance.

Required Methods§

source

fn is_init_only(&self) -> bool

If this extension can be dropped after render creation.

source

fn as_any(&self) -> &dyn Any

Cast to &dyn Any.

source

fn as_any_mut(&mut self) -> &mut dyn Any

Cast to &mut dyn Any.

Provided Methods§

source

fn configure(&mut self, args: &mut RendererConfigArgs<'_>)

Edit options for the new renderer.

source

fn renderer_inited(&mut self, args: &mut RendererInitedArgs<'_>)

Called just after the renderer is created.

source

fn command(&mut self, args: &mut RendererCommandArgs<'_>) -> ApiExtensionPayload

Called when a command request is made for the extension and renderer (window ID).

source

fn render_start(&mut self, args: &mut RenderArgs<'_>)

Called when a new display list begins building.

source

fn render_push(&mut self, args: &mut RenderItemArgs<'_>)

Called when a display item push for the extension is found.

source

fn render_pop(&mut self, args: &mut RenderItemArgs<'_>)

Called when a display item pop for the extension is found.

source

fn render_end(&mut self, args: &mut RenderArgs<'_>)

Called when a new display list finishes building.

The list will be send to the renderer for asynchronous rendering.

source

fn render_update(&mut self, args: &mut RenderUpdateArgs<'_>)

Called when a render-update for the extension is found.

source

fn frame_ready(&mut self, args: &mut FrameReadyArgs)

Called when Webrender finishes rendering a frame and it is ready for redraw.

source

fn redraw(&mut self, args: &mut RedrawArgs<'_>)

Called every time the window or surface redraws, after Webrender has redraw.

source

fn low_memory(&mut self)

System warning low memory, release unused memory, caches.

source

fn renderer_deinited(&mut self, args: &mut RendererDeinitedArgs<'_>)

Called just before the renderer is destroyed.

Implementors§