Struct webrender::composite::ExternalSurfaceDescriptor
source · pub struct ExternalSurfaceDescriptor {
pub local_surface_size: LayoutSize,
pub local_rect: PictureRect,
pub local_clip_rect: PictureRect,
pub clip_rect: DeviceRect,
pub transform_index: CompositorTransformIndex,
pub image_rendering: ImageRendering,
pub z_id: ZBufferId,
pub dependency: ExternalSurfaceDependency,
pub native_surface_id: Option<NativeSurfaceId>,
pub update_params: Option<DeviceIntSize>,
}
Expand description
Describes information about drawing a primitive as a compositor surface. For now, we support only YUV images as compositor surfaces, but in future this will also support RGBA images.
Fields§
§local_surface_size: LayoutSize
§local_rect: PictureRect
§local_clip_rect: PictureRect
§clip_rect: DeviceRect
§transform_index: CompositorTransformIndex
§image_rendering: ImageRendering
§z_id: ZBufferId
§dependency: ExternalSurfaceDependency
§native_surface_id: Option<NativeSurfaceId>
If native compositing is enabled, the native compositor surface handle. Otherwise, this will be None
update_params: Option<DeviceIntSize>
If the native surface needs to be updated, this will contain the size of the native surface as Some(size). If not dirty, this is None.
Implementations§
source§impl ExternalSurfaceDescriptor
impl ExternalSurfaceDescriptor
sourcepub fn get_occluder_rect(
&self,
local_clip_rect: &PictureRect,
map_pic_to_world: &SpaceMapper<PicturePixel, WorldPixel>,
) -> Option<WorldRect>
pub fn get_occluder_rect( &self, local_clip_rect: &PictureRect, map_pic_to_world: &SpaceMapper<PicturePixel, WorldPixel>, ) -> Option<WorldRect>
Calculate an optional occlusion rect for a given compositor surface
Auto Trait Implementations§
impl Freeze for ExternalSurfaceDescriptor
impl RefUnwindSafe for ExternalSurfaceDescriptor
impl Send for ExternalSurfaceDescriptor
impl Sync for ExternalSurfaceDescriptor
impl Unpin for ExternalSurfaceDescriptor
impl UnwindSafe for ExternalSurfaceDescriptor
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 more