Struct webrender::picture_graph::PictureGraph
source · pub struct PictureGraph {
roots: Vec<PictureIndex>,
pic_info: Vec<PictureInfo>,
update_passes: Vec<Vec<PictureIndex>>,
}
Expand description
A graph of picture dependencies, allowing updates to be processed without recursion by building a list of passes.
Fields§
§roots: Vec<PictureIndex>
§pic_info: Vec<PictureInfo>
§update_passes: Vec<Vec<PictureIndex>>
Implementations§
source§impl PictureGraph
impl PictureGraph
pub fn new() -> Self
pub fn reset(&mut self)
sourcepub fn add_root(&mut self, pic_index: PictureIndex)
pub fn add_root(&mut self, pic_index: PictureIndex)
Add a root picture to the graph
sourcepub fn build_update_passes(
&mut self,
pictures: &mut [PicturePrimitive],
frame_context: &FrameBuildingContext<'_>,
)
pub fn build_update_passes( &mut self, pictures: &mut [PicturePrimitive], frame_context: &FrameBuildingContext<'_>, )
Build a list of update passes based on the dependencies between pictures
sourcepub fn assign_surfaces(
&mut self,
pictures: &mut [PicturePrimitive],
surfaces: &mut Vec<SurfaceInfo>,
tile_caches: &mut FastHashMap<SliceId, Box<TileCacheInstance>>,
frame_context: &FrameBuildingContext<'_>,
)
pub fn assign_surfaces( &mut self, pictures: &mut [PicturePrimitive], surfaces: &mut Vec<SurfaceInfo>, tile_caches: &mut FastHashMap<SliceId, Box<TileCacheInstance>>, frame_context: &FrameBuildingContext<'_>, )
Assign surfaces and scale factors to each picture (root -> leaf ordered pass)
sourcepub fn propagate_bounding_rects(
&mut self,
pictures: &mut [PicturePrimitive],
surfaces: &mut [SurfaceInfo],
frame_context: &FrameBuildingContext<'_>,
)
pub fn propagate_bounding_rects( &mut self, pictures: &mut [PicturePrimitive], surfaces: &mut [SurfaceInfo], frame_context: &FrameBuildingContext<'_>, )
Propegate bounding rects from pictures to parents (leaf -> root ordered pass)
Trait Implementations§
source§impl Default for PictureGraph
impl Default for PictureGraph
source§fn default() -> PictureGraph
fn default() -> PictureGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PictureGraph
impl RefUnwindSafe for PictureGraph
impl Send for PictureGraph
impl Sync for PictureGraph
impl Unpin for PictureGraph
impl UnwindSafe for PictureGraph
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