Trait webrender::renderer::ExternalImageHandler[][src]

pub trait ExternalImageHandler {
    fn lock(&mut self, key: ExternalImageId, channel_index: u8) -> ExternalImage;
fn unlock(&mut self, key: ExternalImageId, channel_index: u8); }

The interfaces that an application can implement to support providing external image buffers. When the the application passes an external image to WR, it should kepp that external image life time. People could check the epoch id in RenderNotifier at the client side to make sure that the external image is not used by WR. Then, do the clean up for that external image.

Required Methods

Lock the external image. Then, WR could start to read the image content. The WR client should not change the image content until the unlock() call.

Unlock the external image. The WR should not read the image content after this call.