[][src]Trait azul_webrender::AsyncPropertySampler

pub trait AsyncPropertySampler {
    fn register(&self);
fn sample(
        &self,
        document_id: DocumentId,
        doc: &FastHashMap<PipelineId, Epoch>
    ) -> Vec<FrameMsg>;
fn deregister(&self); }

Allows callers to hook into the main render_backend loop and provide additional frame ops for generate_frame transactions. These functions are all called from the render backend thread.

Required methods

fn register(&self)

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

fn sample(
    &self,
    document_id: DocumentId,
    doc: &FastHashMap<PipelineId, Epoch>
) -> Vec<FrameMsg>

This is called for each transaction with the generate_frame flag set (i.e. that will trigger a render). The list of frame messages returned are processed as though they were part of the original transaction.

fn deregister(&self)

This is called exactly once, when the render backend thread is about to terminate.

Loading content...

Implementors

Loading content...