[][src]Trait azul_webrender::SceneBuilderHooks

pub trait SceneBuilderHooks {
    fn register(&self);
fn pre_scene_build(&self);
fn pre_scene_swap(&self, scenebuild_time: u64);
fn post_scene_swap(
        &self,
        document_id: &Vec<DocumentId>,
        info: PipelineInfo,
        sceneswap_time: u64
    );
fn post_resource_update(&self, document_ids: &Vec<DocumentId>);
fn post_empty_scene_build(&self);
fn poke(&self);
fn deregister(&self); }

Allows callers to hook in at certain points of the async scene build. These functions are all called from the scene builder thread.

Required methods

fn register(&self)

This is called exactly once, when the scene builder thread is started and before it processes anything.

fn pre_scene_build(&self)

This is called before each scene build starts.

fn pre_scene_swap(&self, scenebuild_time: u64)

This is called before each scene swap occurs.

fn post_scene_swap(
    &self,
    document_id: &Vec<DocumentId>,
    info: PipelineInfo,
    sceneswap_time: u64
)

This is called after each scene swap occurs. The PipelineInfo contains the updated epochs and pipelines removed in the new scene compared to the old scene.

fn post_resource_update(&self, document_ids: &Vec<DocumentId>)

This is called after a resource update operation on the scene builder thread, in the case where resource updates were applied without a scene build.

fn post_empty_scene_build(&self)

This is called after a scene build completes without any changes being made. We guarantee that each pre_scene_build call will be matched with exactly one of post_scene_swap, post_resource_update or post_empty_scene_build.

fn poke(&self)

This is a generic callback which provides an opportunity to run code on the scene builder thread. This is called as part of the main message loop of the scene builder thread, but outside of any specific message handler.

fn deregister(&self)

This is called exactly once, when the scene builder thread is about to terminate.

Loading content...

Implementors

Loading content...