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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert