Struct webrender::tile_cache::TileCacheBuilder

source ·
pub struct TileCacheBuilder {
    primary_slices: Vec<PrimarySlice>,
    prev_scroll_root_cache: (SpatialNodeIndex, SpatialNodeIndex),
    root_spatial_node_index: SpatialNodeIndex,
    debug_flags: DebugFlags,
}
Expand description

Used during scene building to construct the list of pending tile caches.

Fields§

§primary_slices: Vec<PrimarySlice>

List of tile caches that have been created so far (last in the list is currently active).

§prev_scroll_root_cache: (SpatialNodeIndex, SpatialNodeIndex)

Cache the previous scroll root search for a spatial node, since they are often the same.

§root_spatial_node_index: SpatialNodeIndex

Handle to the root reference frame

§debug_flags: DebugFlags

Debug flags to provide to our TileCacheInstances.

Implementations§

source§

impl TileCacheBuilder

source

pub fn new( root_spatial_node_index: SpatialNodeIndex, background_color: Option<ColorF>, debug_flags: DebugFlags, ) -> Self

Construct a new tile cache builder.

source

pub fn make_current_slice_atomic(&mut self)

source

pub fn is_current_slice_empty(&self) -> bool

Returns true if the current slice has no primitives added yet

source

pub fn add_tile_cache_barrier( &mut self, slice_flags: SliceFlags, iframe_clip: Option<ClipId>, )

Set a barrier that forces a new tile cache next time a prim is added.

source

fn build_tile_cache( &mut self, prim_list: PrimitiveList, spatial_tree: &SceneSpatialTree, prim_instances: &[PrimitiveInstance], clip_tree_builder: &ClipTreeBuilder, ) -> Option<SliceDescriptor>

Create a new tile cache for an existing prim_list

source

pub fn add_prim( &mut self, prim_instance: PrimitiveInstance, prim_rect: LayoutRect, spatial_node_index: SpatialNodeIndex, prim_flags: PrimitiveFlags, spatial_tree: &SceneSpatialTree, interners: &Interners, quality_settings: &QualitySettings, prim_instances: &mut Vec<PrimitiveInstance>, clip_tree_builder: &ClipTreeBuilder, )

Add a primitive, either to the current tile cache, or a new one, depending on various conditions.

source

pub fn build( self, config: &FrameBuilderConfig, prim_store: &mut PrimitiveStore, spatial_tree: &SceneSpatialTree, prim_instances: &[PrimitiveInstance], clip_tree_builder: &mut ClipTreeBuilder, ) -> (TileCacheConfig, Vec<PictureIndex>)

Consume this object and build the list of tile cache primitives

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.