Skip to main content

TransformLayerEntry

Struct TransformLayerEntry 

Source
pub struct TransformLayerEntry {
    pub picture: Picture,
    pub child_size: Size,
    pub viewport_rect: Rect,
    pub zoom: f32,
    pub scroll_x: f32,
    pub scroll_y: f32,
}
Expand description

A captured TransformLayer — child content recorded into a separate Picture (D087) that the platform replays into its own SkiaCanvas and presents as an additional GPU compositor layer (D088).

Fields§

§picture: Picture

Recorded child draw commands — replay-able independently of the main pass.

§child_size: Size

Natural (unconstrained) size of the child content in logical pixels.

§viewport_rect: Rect

Viewport rect in screen-space logical pixels.

§zoom: f32

Content magnification factor — 1.0 for ordinary scrolling (all existing consumers). InteractiveViewer (Phase 32) is the only consumer that varies this: the offscreen content texture is rasterized at dpi_scale * zoom (engine.rs), so the compositor’s existing UV-window math (uv_span = dest / tex_size) naturally samples a smaller fraction of a bigger texture — real GPU-crisp zoom with no compositor changes. Screen<->content coordinate remap (child_coords/content_to_screen) must divide/multiply by this.

§scroll_x: f32

Current horizontal scroll in logical pixels.

§scroll_y: f32

Current vertical scroll in logical pixels.

Trait Implementations§

Source§

impl Clone for TransformLayerEntry

Source§

fn clone(&self) -> TransformLayerEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.