tracing_perfetto_sdk_schema

Struct LayerProto

Source
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>
👎Deprecated

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>
👎Deprecated
§app_id: Option<i32>
👎Deprecated
§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

Source

pub fn id(&self) -> i32

Returns the value of id, or the default value if id is unset.

Source

pub fn name(&self) -> &str

Returns the value of name, or the default value if name is unset.

Source

pub fn type(&self) -> &str

Returns the value of type, or the default value if type is unset.

Source

pub fn layer_stack(&self) -> u32

Returns the value of layer_stack, or the default value if layer_stack is unset.

Source

pub fn z(&self) -> i32

Returns the value of z, or the default value if z is unset.

Source

pub fn is_opaque(&self) -> bool

Returns the value of is_opaque, or the default value if is_opaque is unset.

Source

pub fn invalidate(&self) -> bool

Returns the value of invalidate, or the default value if invalidate is unset.

Source

pub fn dataspace(&self) -> &str

Returns the value of dataspace, or the default value if dataspace is unset.

Source

pub fn pixel_format(&self) -> &str

Returns the value of pixel_format, or the default value if pixel_format is unset.

Source

pub fn flags(&self) -> u32

Returns the value of flags, or the default value if flags is unset.

Source

pub fn parent(&self) -> i32

Returns the value of parent, or the default value if parent is unset.

Source

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.

Source

pub fn queued_frames(&self) -> i32

Returns the value of queued_frames, or the default value if queued_frames is unset.

Source

pub fn refresh_pending(&self) -> bool

Returns the value of refresh_pending, or the default value if refresh_pending is unset.

Source

pub fn hwc_transform(&self) -> i32

Returns the value of hwc_transform, or the default value if hwc_transform is unset.

Source

pub fn window_type(&self) -> i32

Returns the value of window_type, or the default value if window_type is unset.

Source

pub fn app_id(&self) -> i32

Returns the value of app_id, or the default value if app_id is unset.

Source

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.

Source

pub fn set_hwc_composition_type(&mut self, value: HwcCompositionType)

Sets hwc_composition_type to the provided enum value.

Source

pub fn is_protected(&self) -> bool

Returns the value of is_protected, or the default value if is_protected is unset.

Source

pub fn curr_frame(&self) -> u64

Returns the value of curr_frame, or the default value if curr_frame is unset.

Source

pub fn effective_scaling_mode(&self) -> i32

Returns the value of effective_scaling_mode, or the default value if effective_scaling_mode is unset.

Source

pub fn corner_radius(&self) -> f32

Returns the value of corner_radius, or the default value if corner_radius is unset.

Source

pub fn shadow_radius(&self) -> f32

Returns the value of shadow_radius, or the default value if shadow_radius is unset.

Source

pub fn is_relative_of(&self) -> bool

Returns the value of is_relative_of, or the default value if is_relative_of is unset.

Source

pub fn background_blur_radius(&self) -> i32

Returns the value of background_blur_radius, or the default value if background_blur_radius is unset.

Source

pub fn owner_uid(&self) -> u32

Returns the value of owner_uid, or the default value if owner_uid is unset.

Source

pub fn is_trusted_overlay(&self) -> bool

Returns the value of is_trusted_overlay, or the default value if is_trusted_overlay is unset.

Source

pub fn requested_corner_radius(&self) -> f32

Returns the value of requested_corner_radius, or the default value if requested_corner_radius is unset.

Source

pub fn original_id(&self) -> u32

Returns the value of original_id, or the default value if original_id is unset.

Source

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.

Source

pub fn set_trusted_overlay(&mut self, value: TrustedOverlay)

Sets trusted_overlay to the provided enum value.

Trait Implementations§

Source§

impl Clone for LayerProto

Source§

fn clone(&self) -> LayerProto

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LayerProto

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LayerProto

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for LayerProto

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for LayerProto

Source§

fn eq(&self, other: &LayerProto) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for LayerProto

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.