pub struct PrimaryLayer {
pub image_metadata: ImageMetadata,
pub alpha_mode: AlphaMode,
pub alpha_layer_val: f32,
pub transform: Transform,
pub src_frame: Frame,
pub dest_frame: Frame,
}
Fields§
§image_metadata: ImageMetadata
§alpha_mode: AlphaMode
If alpha_mode
is AlphaMode.DISABLE
, the layer is opaque and
alpha_layer_val
is ignored.
If alpha_mode
is AlphaMode.PREMULTIPLIED
or HW_MULTIPLY
, the
alpha used when blending is determined by the product of
alpha_layer_val
and any per-pixel alpha.
Additionally, if alpha_mode
is AlphaMode.PREMULTIPLIED
, then the
hardware must premultiply the color channel with alpha_layer_val
before blending.
alpha_layer_val
must be in the range [0, 1].
alpha_layer_val: f32
§transform: Transform
§src_frame: Frame
The source frame, where (0,0) is the top-left corner of the image. The client guarantees that src_frame lies entirely within the image.
dest_frame: Frame
The destination frame, where (0,0) is the top-left corner of the composed output. The client guarantees that dest_frame lies entirely within the composed output.
Trait Implementations§
source§impl Clone for PrimaryLayer
impl Clone for PrimaryLayer
source§fn clone(&self) -> PrimaryLayer
fn clone(&self) -> PrimaryLayer
Returns a copy 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 moresource§impl Debug for PrimaryLayer
impl Debug for PrimaryLayer
source§impl Decode<PrimaryLayer> for PrimaryLayer
impl Decode<PrimaryLayer> for PrimaryLayer
source§impl Encode<PrimaryLayer> for &PrimaryLayer
impl Encode<PrimaryLayer> for &PrimaryLayer
source§impl<T0: Encode<ImageMetadata>, T1: Encode<AlphaMode>, T2: Encode<f32>, T3: Encode<Transform>, T4: Encode<Frame>, T5: Encode<Frame>> Encode<PrimaryLayer> for (T0, T1, T2, T3, T4, T5)
impl<T0: Encode<ImageMetadata>, T1: Encode<AlphaMode>, T2: Encode<f32>, T3: Encode<Transform>, T4: Encode<Frame>, T5: Encode<Frame>> Encode<PrimaryLayer> for (T0, T1, T2, T3, T4, T5)
source§impl PartialEq for PrimaryLayer
impl PartialEq for PrimaryLayer
source§fn eq(&self, other: &PrimaryLayer) -> bool
fn eq(&self, other: &PrimaryLayer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PrimaryLayer
impl PartialOrd for PrimaryLayer
source§fn partial_cmp(&self, other: &PrimaryLayer) -> Option<Ordering>
fn partial_cmp(&self, other: &PrimaryLayer) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for PrimaryLayer
impl TypeMarker for PrimaryLayer
§type Owned = PrimaryLayer
type Owned = PrimaryLayer
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for PrimaryLayer
impl ValueTypeMarker for PrimaryLayer
§type Borrowed<'a> = &'a PrimaryLayer
type Borrowed<'a> = &'a PrimaryLayer
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for PrimaryLayer
impl Persistable for PrimaryLayer
impl StructuralPartialEq for PrimaryLayer
Auto Trait Implementations§
impl Freeze for PrimaryLayer
impl RefUnwindSafe for PrimaryLayer
impl Send for PrimaryLayer
impl Sync for PrimaryLayer
impl Unpin for PrimaryLayer
impl UnwindSafe for PrimaryLayer
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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