pub struct EmbeddedLayer { /* private fields */ }Expand description
A layer that places a composition layer the host composites: Flutter’s PlatformViewLayer.
A leaf, like a picture layer, retained with its ancestors like any other: the scene keeps it as a layer of its own, and a host places the composition layer from the tree every frame.
Implementations§
Source§impl EmbeddedLayer
impl EmbeddedLayer
Sourcepub fn new(
app: &mut App,
composition_layer: Arc<dyn CompositionLayer>,
rect: Rect,
) -> Handle<EmbeddedLayer>
pub fn new( app: &mut App, composition_layer: Arc<dyn CompositionLayer>, rect: Rect, ) -> Handle<EmbeddedLayer>
A layer placing composition_layer at rect.
pub fn composition_layer( self: Handle<Self>, app: &App, ) -> &Arc<dyn CompositionLayer> ⓘ
pub fn rect(self: Handle<Self>, app: &App) -> Rect
Trait Implementations§
Source§impl Layer for EmbeddedLayer
impl Layer for EmbeddedLayer
Source§fn layer_data(self: Handle<Self>, app: &App) -> &LayerData
fn layer_data(self: Handle<Self>, app: &App) -> &LayerData
Dart’s base-class fields, held under the field
layer ([layer_accessors!]).Source§fn layer_data_mut(self: Handle<Self>, app: &mut App) -> &mut LayerData
fn layer_data_mut(self: Handle<Self>, app: &mut App) -> &mut LayerData
See
layer_data.Source§fn add_to_scene(self: Handle<Self>, app: &mut App, builder: &mut SceneBuilder)
fn add_to_scene(self: Handle<Self>, app: &mut App, builder: &mut SceneBuilder)
Override this method to upload this layer to the engine.
Source§fn find_annotations(
self: Handle<Self>,
_app: &App,
_result: &mut AnnotationSearch,
_local_position: Offset,
_only_first: bool,
) -> bool
fn find_annotations( self: Handle<Self>, _app: &App, _result: &mut AnnotationSearch, _local_position: Offset, _only_first: bool, ) -> bool
Search this layer and its subtree for annotations of the searched type at the location
described by
local_position. Read moreSource§const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable> = None
const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable> = None
The container table when this type
extends ContainerLayer; layer_accessors!(container)
sets it. Dart’s layer is ContainerLayer.Source§fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
Whether or not this layer, or any child layers, can be rasterized with
Scene.toImage. Read moreSource§fn describe_clip_bounds(self: Handle<Self>, app: &App) -> Option<Rect>
fn describe_clip_bounds(self: Handle<Self>, app: &App) -> Option<Rect>
Describes the clip that would be applied to contents of this layer, if any.
Source§fn always_needs_add_to_scene(self: Handle<Self>, app: &App) -> bool
fn always_needs_add_to_scene(self: Handle<Self>, app: &App) -> bool
Subclasses may override this to true to disable retained rendering.
Source§fn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Clears any retained resources that this layer holds. Read more
Source§fn attach(self: Handle<Self>, app: &mut App, owner: HandleId)
fn attach(self: Handle<Self>, app: &mut App, owner: HandleId)
Mark this layer as attached to the given owner. Read more
Source§fn detach(self: Handle<Self>, app: &mut App)
fn detach(self: Handle<Self>, app: &mut App)
Mark this layer as detached from its owner. Read more
Source§fn redepth_children(self: Handle<Self>, app: &mut App)
fn redepth_children(self: Handle<Self>, app: &mut App)
Adjust the depth of this node’s children, if any. Read more
Source§fn fire_composition_callbacks(
self: Handle<Self>,
app: &mut App,
include_children: bool,
)
fn fire_composition_callbacks( self: Handle<Self>, app: &mut App, include_children: bool, )
Dart’s
_fireCompositionCallbacks; ContainerLayer recurses into its children.Auto Trait Implementations§
impl !RefUnwindSafe for EmbeddedLayer
impl !Send for EmbeddedLayer
impl !Sync for EmbeddedLayer
impl !UnwindSafe for EmbeddedLayer
impl Freeze for EmbeddedLayer
impl Unpin for EmbeddedLayer
impl UnsafeUnpin for EmbeddedLayer
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