pub struct ExternalSurfaceDescriptor {Show 13 fields
pub local_surface_size: LayoutSize,
pub local_rect: PictureRect,
pub local_clip_rect: PictureRect,
pub clip_rect: DeviceRect,
pub transform_index: CompositorTransformIndex,
pub compositor_clip_index: Option<CompositorClipIndex>,
pub image_rendering: ImageRendering,
pub z_id: ZBufferId,
pub dependency: ExternalSurfaceDependency,
pub native_surface_id: Option<NativeSurfaceId>,
pub update_params: Option<DeviceIntSize>,
pub external_image_id: Option<ExternalImageId>,
pub prim_instance_index: PrimitiveInstanceIndex,
}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§compositor_clip_index: Option<CompositorClipIndex>§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.
external_image_id: Option<ExternalImageId>If using external compositing, a user key for the client
prim_instance_index: PrimitiveInstanceIndexImplementations§
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
Trait Implementations§
Source§impl Clone for ExternalSurfaceDescriptor
impl Clone for ExternalSurfaceDescriptor
Source§fn clone(&self) -> ExternalSurfaceDescriptor
fn clone(&self) -> ExternalSurfaceDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExternalSurfaceDescriptor
impl RefUnwindSafe for ExternalSurfaceDescriptor
impl Send for ExternalSurfaceDescriptor
impl Sync for ExternalSurfaceDescriptor
impl Unpin for ExternalSurfaceDescriptor
impl UnsafeUnpin 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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