pub struct WebrenderExternalImageHandlers {
pub(crate) webgl_handler: Option<Box<dyn WebrenderExternalImageApi>>,
pub(crate) media_handler: Option<Box<dyn WebrenderExternalImageApi>>,
pub(crate) webgpu_handler: Option<Box<dyn WebrenderExternalImageApi>>,
pub(crate) external_images: Arc<Mutex<WebrenderExternalImageRegistry>>,
}
Expand description
WebRender External Image Handler implementation.
Fields§
§webgl_handler: Option<Box<dyn WebrenderExternalImageApi>>
WebGL handler.
media_handler: Option<Box<dyn WebrenderExternalImageApi>>
Media player handler.
webgpu_handler: Option<Box<dyn WebrenderExternalImageApi>>
WebGPU handler.
external_images: Arc<Mutex<WebrenderExternalImageRegistry>>
Webrender external images.
Implementations§
source§impl WebrenderExternalImageHandlers
impl WebrenderExternalImageHandlers
pub fn new() -> (Self, Arc<Mutex<WebrenderExternalImageRegistry>>)
pub fn set_handler( &mut self, handler: Box<dyn WebrenderExternalImageApi>, handler_type: WebrenderImageHandlerType, )
Trait Implementations§
source§impl ExternalImageHandler for WebrenderExternalImageHandlers
impl ExternalImageHandler for WebrenderExternalImageHandlers
source§fn lock(
&mut self,
key: ExternalImageId,
_channel_index: u8,
) -> ExternalImage<'_>
fn lock( &mut self, key: ExternalImageId, _channel_index: u8, ) -> 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.
source§fn unlock(&mut self, key: ExternalImageId, _channel_index: u8)
fn unlock(&mut self, key: ExternalImageId, _channel_index: u8)
Unlock the external image. The WR should not read the image content after this call.
Auto Trait Implementations§
impl Freeze for WebrenderExternalImageHandlers
impl !RefUnwindSafe for WebrenderExternalImageHandlers
impl !Send for WebrenderExternalImageHandlers
impl !Sync for WebrenderExternalImageHandlers
impl Unpin for WebrenderExternalImageHandlers
impl !UnwindSafe for WebrenderExternalImageHandlers
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more