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§
sourcefn is_init_only(&self) -> bool
fn is_init_only(&self) -> bool
If this extension can be dropped after render creation.
sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Cast to &mut dyn Any
.
Provided Methods§
sourcefn configure(&mut self, args: &mut RendererConfigArgs<'_>)
fn configure(&mut self, args: &mut RendererConfigArgs<'_>)
Edit options for the new renderer.
sourcefn renderer_inited(&mut self, args: &mut RendererInitedArgs<'_>)
fn renderer_inited(&mut self, args: &mut RendererInitedArgs<'_>)
Called just after the renderer is created.
sourcefn command(&mut self, args: &mut RendererCommandArgs<'_>) -> ApiExtensionPayload
fn command(&mut self, args: &mut RendererCommandArgs<'_>) -> ApiExtensionPayload
Called when a command request is made for the extension and renderer (window ID).
sourcefn render_start(&mut self, args: &mut RenderArgs<'_>)
fn render_start(&mut self, args: &mut RenderArgs<'_>)
Called when a new display list begins building.
sourcefn render_push(&mut self, args: &mut RenderItemArgs<'_>)
fn render_push(&mut self, args: &mut RenderItemArgs<'_>)
Called when a display item push for the extension is found.
sourcefn render_pop(&mut self, args: &mut RenderItemArgs<'_>)
fn render_pop(&mut self, args: &mut RenderItemArgs<'_>)
Called when a display item pop for the extension is found.
sourcefn render_end(&mut self, args: &mut RenderArgs<'_>)
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.
sourcefn render_update(&mut self, args: &mut RenderUpdateArgs<'_>)
fn render_update(&mut self, args: &mut RenderUpdateArgs<'_>)
Called when a render-update for the extension is found.
sourcefn frame_ready(&mut self, args: &mut FrameReadyArgs)
fn frame_ready(&mut self, args: &mut FrameReadyArgs)
Called when Webrender finishes rendering a frame and it is ready for redraw.
sourcefn redraw(&mut self, args: &mut RedrawArgs<'_>)
fn redraw(&mut self, args: &mut RedrawArgs<'_>)
Called every time the window or surface redraws, after Webrender has redraw.
sourcefn low_memory(&mut self)
fn low_memory(&mut self)
System warning low memory, release unused memory, caches.
sourcefn renderer_deinited(&mut self, args: &mut RendererDeinitedArgs<'_>)
fn renderer_deinited(&mut self, args: &mut RendererDeinitedArgs<'_>)
Called just before the renderer is destroyed.