Struct webrender::picture::PrimitiveList
source · pub struct PrimitiveList {
pub clusters: Vec<PrimitiveCluster>,
pub child_pictures: Vec<PictureIndex>,
pub image_surface_count: usize,
pub yuv_image_surface_count: usize,
pub needs_scissor_rect: bool,
}
Expand description
A list of primitive instances that are added to a picture This ensures we can keep a list of primitives that are pictures, for a fast initial traversal of the picture tree without walking the instance list.
Fields§
§clusters: Vec<PrimitiveCluster>
List of primitives grouped into clusters.
child_pictures: Vec<PictureIndex>
§image_surface_count: usize
The number of Image compositor surfaces that were found when adding prims to this list, which might be rendered as overlays.
yuv_image_surface_count: usize
The number of YuvImage compositor surfaces that were found when adding prims to this list, which might be rendered as overlays.
needs_scissor_rect: bool
Implementations§
source§impl PrimitiveList
impl PrimitiveList
sourcepub fn empty() -> Self
pub fn empty() -> Self
Construct an empty primitive list. This is just used during the take_context / restore_context borrow check dance, which will be removed as the picture traversal pass is completed.
pub fn merge(&mut self, other: PrimitiveList)
sourcepub fn add_prim(
&mut self,
prim_instance: PrimitiveInstance,
prim_rect: LayoutRect,
spatial_node_index: SpatialNodeIndex,
prim_flags: PrimitiveFlags,
prim_instances: &mut Vec<PrimitiveInstance>,
clip_tree_builder: &ClipTreeBuilder,
)
pub fn add_prim( &mut self, prim_instance: PrimitiveInstance, prim_rect: LayoutRect, spatial_node_index: SpatialNodeIndex, prim_flags: PrimitiveFlags, prim_instances: &mut Vec<PrimitiveInstance>, clip_tree_builder: &ClipTreeBuilder, )
Add a primitive instance to the end of the list
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrimitiveList
impl RefUnwindSafe for PrimitiveList
impl Send for PrimitiveList
impl Sync for PrimitiveList
impl Unpin for PrimitiveList
impl UnwindSafe for PrimitiveList
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