pub struct LayerProto {Show 59 fields
pub id: Option<i32>,
pub name: Option<String>,
pub children: Vec<i32>,
pub relatives: Vec<i32>,
pub type: Option<String>,
pub transparent_region: Option<RegionProto>,
pub visible_region: Option<RegionProto>,
pub damage_region: Option<RegionProto>,
pub layer_stack: Option<u32>,
pub z: Option<i32>,
pub position: Option<PositionProto>,
pub requested_position: Option<PositionProto>,
pub size: Option<SizeProto>,
pub crop: Option<RectProto>,
pub final_crop: Option<RectProto>,
pub is_opaque: Option<bool>,
pub invalidate: Option<bool>,
pub dataspace: Option<String>,
pub pixel_format: Option<String>,
pub color: Option<ColorProto>,
pub requested_color: Option<ColorProto>,
pub flags: Option<u32>,
pub transform: Option<TransformProto>,
pub requested_transform: Option<TransformProto>,
pub parent: Option<i32>,
pub z_order_relative_of: Option<i32>,
pub active_buffer: Option<ActiveBufferProto>,
pub queued_frames: Option<i32>,
pub refresh_pending: Option<bool>,
pub hwc_frame: Option<RectProto>,
pub hwc_crop: Option<FloatRectProto>,
pub hwc_transform: Option<i32>,
pub window_type: Option<i32>,
pub app_id: Option<i32>,
pub hwc_composition_type: Option<i32>,
pub is_protected: Option<bool>,
pub curr_frame: Option<u64>,
pub barrier_layer: Vec<BarrierLayerProto>,
pub buffer_transform: Option<TransformProto>,
pub effective_scaling_mode: Option<i32>,
pub corner_radius: Option<f32>,
pub metadata: HashMap<i32, String>,
pub effective_transform: Option<TransformProto>,
pub source_bounds: Option<FloatRectProto>,
pub bounds: Option<FloatRectProto>,
pub screen_bounds: Option<FloatRectProto>,
pub input_window_info: Option<InputWindowInfoProto>,
pub corner_radius_crop: Option<FloatRectProto>,
pub shadow_radius: Option<f32>,
pub color_transform: Option<ColorTransformProto>,
pub is_relative_of: Option<bool>,
pub background_blur_radius: Option<i32>,
pub owner_uid: Option<u32>,
pub blur_regions: Vec<BlurRegion>,
pub is_trusted_overlay: Option<bool>,
pub requested_corner_radius: Option<f32>,
pub destination_frame: Option<RectProto>,
pub original_id: Option<u32>,
pub trusted_overlay: Option<i32>,
}
Expand description
Information about each layer.
Fields§
§id: Option<i32>
unique id per layer.
name: Option<String>
unique name per layer. Example: “Wallpaper”.
children: Vec<i32>
list of children this layer may have. May be empty.
relatives: Vec<i32>
list of layers that are z order relative to this layer.
type: Option<String>
The type of layer. Examples: “ContainerLayer”, “BufferStateLayer”.
transparent_region: Option<RegionProto>
§visible_region: Option<RegionProto>
§damage_region: Option<RegionProto>
§layer_stack: Option<u32>
§z: Option<i32>
The layer’s z order. Can be z order in layer stack, relative to parent, or relative to another layer specified in zOrderRelative.
position: Option<PositionProto>
The layer’s position on the display.
requested_position: Option<PositionProto>
The layer’s requested position.
size: Option<SizeProto>
The layer’s size.
crop: Option<RectProto>
The layer’s crop in its own bounds.
final_crop: Option<RectProto>
The layer’s crop in its parent’s bounds.
is_opaque: Option<bool>
§invalidate: Option<bool>
§dataspace: Option<String>
Composition states’s dataspace. Examples: “STANDARD_BT709”, “STANDARD_BT601_625”. See full enum in frameworks/native/libs/nativewindow/include/android/data_space.h
pixel_format: Option<String>
Buffer’s pixel format Examples: “PIXEL_FORMAT_TRANSLUCENT”, “PIXEL_FORMAT_RGBA_8888”. See full enum in frameworks/native/libs/ui/include/ui/PixelFormat.h
color: Option<ColorProto>
The layer’s actual color.
requested_color: Option<ColorProto>
The layer’s requested color.
flags: Option<u32>
Can be any combination of hidden = 0x01 opaque = 0x02, secure = 0x80,
transform: Option<TransformProto>
The layer’s actual transform
requested_transform: Option<TransformProto>
The layer’s requested transform.
parent: Option<i32>
The parent layer. This value can be null if there is no parent.
z_order_relative_of: Option<i32>
The layer that this layer has a z order relative to. This value can be null.
active_buffer: Option<ActiveBufferProto>
This value can be null if there’s nothing to draw.
queued_frames: Option<i32>
The number of frames available.
refresh_pending: Option<bool>
§hwc_frame: Option<RectProto>
The layer’s composer backend destination frame
hwc_crop: Option<FloatRectProto>
The layer’s composer backend source crop
hwc_transform: Option<i32>
The layer’s composer backend transform
window_type: Option<i32>
app_id: Option<i32>
hwc_composition_type: Option<i32>
The layer’s composition type
is_protected: Option<bool>
If it’s a buffer layer, indicate if the content is protected
curr_frame: Option<u64>
Current frame number being rendered.
barrier_layer: Vec<BarrierLayerProto>
A list of barriers that the layer is waiting to update state.
buffer_transform: Option<TransformProto>
If active_buffer is not null, record its transform.
effective_scaling_mode: Option<i32>
§corner_radius: Option<f32>
Layer’s corner radius.
metadata: HashMap<i32, String>
Metadata map. May be empty.
effective_transform: Option<TransformProto>
§source_bounds: Option<FloatRectProto>
§bounds: Option<FloatRectProto>
§screen_bounds: Option<FloatRectProto>
§input_window_info: Option<InputWindowInfoProto>
§corner_radius_crop: Option<FloatRectProto>
Crop used to draw the rounded corner.
shadow_radius: Option<f32>
length of the shadow to draw around the layer, it may be set on the layer or set by a parent layer.
color_transform: Option<ColorTransformProto>
§is_relative_of: Option<bool>
§background_blur_radius: Option<i32>
Layer’s background blur radius in pixels.
owner_uid: Option<u32>
§blur_regions: Vec<BlurRegion>
Regions of a layer, where blur should be applied.
is_trusted_overlay: Option<bool>
§requested_corner_radius: Option<f32>
Corner radius explicitly set on layer rather than inherited
destination_frame: Option<RectProto>
§original_id: Option<u32>
§trusted_overlay: Option<i32>
Implementations§
Source§impl LayerProto
impl LayerProto
Sourcepub fn layer_stack(&self) -> u32
pub fn layer_stack(&self) -> u32
Returns the value of layer_stack
, or the default value if layer_stack
is unset.
Sourcepub fn is_opaque(&self) -> bool
pub fn is_opaque(&self) -> bool
Returns the value of is_opaque
, or the default value if is_opaque
is unset.
Sourcepub fn invalidate(&self) -> bool
pub fn invalidate(&self) -> bool
Returns the value of invalidate
, or the default value if invalidate
is unset.
Sourcepub fn dataspace(&self) -> &str
pub fn dataspace(&self) -> &str
Returns the value of dataspace
, or the default value if dataspace
is unset.
Sourcepub fn pixel_format(&self) -> &str
pub fn pixel_format(&self) -> &str
Returns the value of pixel_format
, or the default value if pixel_format
is unset.
Sourcepub fn parent(&self) -> i32
pub fn parent(&self) -> i32
Returns the value of parent
, or the default value if parent
is unset.
Sourcepub fn z_order_relative_of(&self) -> i32
pub fn z_order_relative_of(&self) -> i32
Returns the value of z_order_relative_of
, or the default value if z_order_relative_of
is unset.
Sourcepub fn queued_frames(&self) -> i32
pub fn queued_frames(&self) -> i32
Returns the value of queued_frames
, or the default value if queued_frames
is unset.
Sourcepub fn refresh_pending(&self) -> bool
pub fn refresh_pending(&self) -> bool
Returns the value of refresh_pending
, or the default value if refresh_pending
is unset.
Sourcepub fn hwc_transform(&self) -> i32
pub fn hwc_transform(&self) -> i32
Returns the value of hwc_transform
, or the default value if hwc_transform
is unset.
Sourcepub fn window_type(&self) -> i32
pub fn window_type(&self) -> i32
Returns the value of window_type
, or the default value if window_type
is unset.
Sourcepub fn app_id(&self) -> i32
pub fn app_id(&self) -> i32
Returns the value of app_id
, or the default value if app_id
is unset.
Sourcepub fn hwc_composition_type(&self) -> HwcCompositionType
pub fn hwc_composition_type(&self) -> HwcCompositionType
Returns the enum value of hwc_composition_type
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_hwc_composition_type(&mut self, value: HwcCompositionType)
pub fn set_hwc_composition_type(&mut self, value: HwcCompositionType)
Sets hwc_composition_type
to the provided enum value.
Sourcepub fn is_protected(&self) -> bool
pub fn is_protected(&self) -> bool
Returns the value of is_protected
, or the default value if is_protected
is unset.
Sourcepub fn curr_frame(&self) -> u64
pub fn curr_frame(&self) -> u64
Returns the value of curr_frame
, or the default value if curr_frame
is unset.
Sourcepub fn effective_scaling_mode(&self) -> i32
pub fn effective_scaling_mode(&self) -> i32
Returns the value of effective_scaling_mode
, or the default value if effective_scaling_mode
is unset.
Sourcepub fn corner_radius(&self) -> f32
pub fn corner_radius(&self) -> f32
Returns the value of corner_radius
, or the default value if corner_radius
is unset.
Sourcepub fn shadow_radius(&self) -> f32
pub fn shadow_radius(&self) -> f32
Returns the value of shadow_radius
, or the default value if shadow_radius
is unset.
Sourcepub fn is_relative_of(&self) -> bool
pub fn is_relative_of(&self) -> bool
Returns the value of is_relative_of
, or the default value if is_relative_of
is unset.
Sourcepub fn background_blur_radius(&self) -> i32
pub fn background_blur_radius(&self) -> i32
Returns the value of background_blur_radius
, or the default value if background_blur_radius
is unset.
Sourcepub fn owner_uid(&self) -> u32
pub fn owner_uid(&self) -> u32
Returns the value of owner_uid
, or the default value if owner_uid
is unset.
Sourcepub fn is_trusted_overlay(&self) -> bool
pub fn is_trusted_overlay(&self) -> bool
Returns the value of is_trusted_overlay
, or the default value if is_trusted_overlay
is unset.
Sourcepub fn requested_corner_radius(&self) -> f32
pub fn requested_corner_radius(&self) -> f32
Returns the value of requested_corner_radius
, or the default value if requested_corner_radius
is unset.
Sourcepub fn original_id(&self) -> u32
pub fn original_id(&self) -> u32
Returns the value of original_id
, or the default value if original_id
is unset.
Sourcepub fn trusted_overlay(&self) -> TrustedOverlay
pub fn trusted_overlay(&self) -> TrustedOverlay
Returns the enum value of trusted_overlay
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_trusted_overlay(&mut self, value: TrustedOverlay)
pub fn set_trusted_overlay(&mut self, value: TrustedOverlay)
Sets trusted_overlay
to the provided enum value.
Trait Implementations§
Source§impl Clone for LayerProto
impl Clone for LayerProto
Source§fn clone(&self) -> LayerProto
fn clone(&self) -> LayerProto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LayerProto
impl Debug for LayerProto
Source§impl Default for LayerProto
impl Default for LayerProto
Source§impl Message for LayerProto
impl Message for LayerProto
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.