Struct webrender::scene_building::PictureChainBuilder
source · struct PictureChainBuilder {
current: PictureSource,
spatial_node_index: SpatialNodeIndex,
flags: PrimitiveFlags,
raster_space: RasterSpace,
set_resolve_target: bool,
establishes_sub_graph: bool,
}
Expand description
Helper struct to build picture chains during scene building from a flattened stacking context struct.
Fields§
§current: PictureSource
The current input source for the next picture
spatial_node_index: SpatialNodeIndex
Positioning node for this picture chain
flags: PrimitiveFlags
Prim flags for any pictures in this chain
raster_space: RasterSpace
Requested raster space for enclosing stacking context
set_resolve_target: bool
If true, set first picture as a resolve target
establishes_sub_graph: bool
If true, mark the last picture as a sub-graph
Implementations§
source§impl PictureChainBuilder
impl PictureChainBuilder
sourcefn from_prim_list(
prim_list: PrimitiveList,
flags: PrimitiveFlags,
spatial_node_index: SpatialNodeIndex,
raster_space: RasterSpace,
is_sub_graph: bool,
) -> Self
fn from_prim_list( prim_list: PrimitiveList, flags: PrimitiveFlags, spatial_node_index: SpatialNodeIndex, raster_space: RasterSpace, is_sub_graph: bool, ) -> Self
Create a new picture chain builder, from a primitive list
sourcefn from_instance(
instance: PrimitiveInstance,
flags: PrimitiveFlags,
spatial_node_index: SpatialNodeIndex,
raster_space: RasterSpace,
) -> Self
fn from_instance( instance: PrimitiveInstance, flags: PrimitiveFlags, spatial_node_index: SpatialNodeIndex, raster_space: RasterSpace, ) -> Self
Create a new picture chain builder, from a picture wrapper instance
sourcefn add_picture(
self,
composite_mode: PictureCompositeMode,
clip_node_id: ClipNodeId,
context_3d: Picture3DContext<OrderedPictureChild>,
interners: &mut Interners,
prim_store: &mut PrimitiveStore,
prim_instances: &mut Vec<PrimitiveInstance>,
clip_tree_builder: &mut ClipTreeBuilder,
) -> PictureChainBuilder
fn add_picture( self, composite_mode: PictureCompositeMode, clip_node_id: ClipNodeId, context_3d: Picture3DContext<OrderedPictureChild>, interners: &mut Interners, prim_store: &mut PrimitiveStore, prim_instances: &mut Vec<PrimitiveInstance>, clip_tree_builder: &mut ClipTreeBuilder, ) -> PictureChainBuilder
Wrap the existing content with a new picture with the given parameters
sourcefn finalize(
self,
clip_node_id: ClipNodeId,
interners: &mut Interners,
prim_store: &mut PrimitiveStore,
clip_tree_builder: &mut ClipTreeBuilder,
) -> PrimitiveInstance
fn finalize( self, clip_node_id: ClipNodeId, interners: &mut Interners, prim_store: &mut PrimitiveStore, clip_tree_builder: &mut ClipTreeBuilder, ) -> PrimitiveInstance
Finish building this picture chain. Set the clip chain on the outermost picture
sourcefn has_picture(&self) -> bool
fn has_picture(&self) -> bool
Returns true if this builder wraps a picture
Auto Trait Implementations§
impl Freeze for PictureChainBuilder
impl RefUnwindSafe for PictureChainBuilder
impl Send for PictureChainBuilder
impl Sync for PictureChainBuilder
impl Unpin for PictureChainBuilder
impl UnwindSafe for PictureChainBuilder
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more