#[repr(C)]pub struct CompositeInstance {
rect: DeviceRect,
clip_rect: DeviceRect,
color: PremultipliedColorF,
_padding: f32,
color_space_or_uv_type: f32,
yuv_format: f32,
yuv_channel_bit_depth: f32,
uv_rects: [TexelRect; 3],
flip: (f32, f32),
rounded_clip_rect: DeviceRect,
rounded_clip_radii: [f32; 4],
}Expand description
Vertex format for picture cache composite shader. When editing the members, update desc::COMPOSITE so its list of instance_attributes matches:
Fields§
§rect: DeviceRect§clip_rect: DeviceRect§color: PremultipliedColorF§_padding: f32§color_space_or_uv_type: f32§yuv_format: f32§yuv_channel_bit_depth: f32§uv_rects: [TexelRect; 3]§flip: (f32, f32)§rounded_clip_rect: DeviceRect§rounded_clip_radii: [f32; 4]Implementations§
Source§impl CompositeInstance
impl CompositeInstance
pub fn new( rect: DeviceRect, clip_rect: DeviceRect, color: PremultipliedColorF, flip: (bool, bool), clip: Option<&CompositorClip>, ) -> Self
pub fn new_rgb( rect: DeviceRect, clip_rect: DeviceRect, color: PremultipliedColorF, uv_rect: TexelRect, normalized_uvs: bool, flip: (bool, bool), clip: Option<&CompositorClip>, ) -> Self
pub fn new_yuv( rect: DeviceRect, clip_rect: DeviceRect, yuv_color_space: YuvRangedColorSpace, yuv_format: YuvFormat, yuv_channel_bit_depth: u32, uv_rects: [TexelRect; 3], flip: (bool, bool), clip: Option<&CompositorClip>, ) -> Self
pub fn get_rgb_features(&self) -> CompositeFeatures
pub fn get_yuv_features(&self) -> CompositeFeatures
fn vertex_clip_params( clip: Option<&CompositorClip>, default_rect: DeviceRect, ) -> (DeviceRect, [f32; 4])
Trait Implementations§
Source§impl Clone for CompositeInstance
impl Clone for CompositeInstance
Source§fn clone(&self) -> CompositeInstance
fn clone(&self) -> CompositeInstance
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 CompositeInstance
impl RefUnwindSafe for CompositeInstance
impl Send for CompositeInstance
impl Sync for CompositeInstance
impl Unpin for CompositeInstance
impl UnwindSafe for CompositeInstance
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