pub struct SurfaceLayer { /* private fields */ }Expand description
A layer that places a native surface 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 surface from the tree every frame.
Implementations§
Trait Implementations§
Source§impl Layer for SurfaceLayer
impl Layer for SurfaceLayer
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 SurfaceLayer
impl !Send for SurfaceLayer
impl !Sync for SurfaceLayer
impl !UnwindSafe for SurfaceLayer
impl Freeze for SurfaceLayer
impl Unpin for SurfaceLayer
impl UnsafeUnpin for SurfaceLayer
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