[−][src]Trait azul_webrender_api::ExternalImageHandler
The interfaces that an application can implement to support providing external image buffers. When the application passes an external image to WR, it should keep 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
fn lock(
&mut self,
key: ExternalImageId,
channel_index: u8,
rendering: ImageRendering
) -> ExternalImage
&mut self,
key: ExternalImageId,
channel_index: u8,
rendering: ImageRendering
) -> ExternalImage
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. Provide ImageRendering for NativeTexture external images.
fn unlock(&mut self, key: ExternalImageId, channel_index: u8)
Unlock the external image. WR should not read the image content after this call.