webrender::frame_builder

Struct FrameBuildingState

Source
pub struct FrameBuildingState<'a> {
Show 17 fields pub rg_builder: &'a mut RenderTaskGraphBuilder, pub clip_store: &'a mut ClipStore, pub resource_cache: &'a mut ResourceCache, pub gpu_cache: &'a mut GpuCache, pub transforms: &'a mut TransformPalette, pub segment_builder: SegmentBuilder, pub surfaces: &'a mut Vec<SurfaceInfo>, pub dirty_region_stack: Vec<DirtyRegion>, pub composite_state: &'a mut CompositeState, pub num_visible_primitives: u32, pub plane_splitters: &'a mut [BspSplitter<PlaneSplitAnchor>], pub surface_builder: SurfaceBuilder, pub cmd_buffers: &'a mut CommandBufferList, pub clip_tree: &'a ClipTree, pub frame_gpu_data: &'a mut GpuBufferBuilder, pub image_dependencies: FastHashMap<ImageKey, RenderTaskId>, pub visited_pictures: &'a mut [bool],
}

Fields§

§rg_builder: &'a mut RenderTaskGraphBuilder§clip_store: &'a mut ClipStore§resource_cache: &'a mut ResourceCache§gpu_cache: &'a mut GpuCache§transforms: &'a mut TransformPalette§segment_builder: SegmentBuilder§surfaces: &'a mut Vec<SurfaceInfo>§dirty_region_stack: Vec<DirtyRegion>§composite_state: &'a mut CompositeState§num_visible_primitives: u32§plane_splitters: &'a mut [BspSplitter<PlaneSplitAnchor>]§surface_builder: SurfaceBuilder§cmd_buffers: &'a mut CommandBufferList§clip_tree: &'a ClipTree§frame_gpu_data: &'a mut GpuBufferBuilder§image_dependencies: FastHashMap<ImageKey, RenderTaskId>

When using a render task to produce pixels that are associated with an image key (for example snapshotted pictures), inserting the image key / task id association in this hashmap allows the image item to register a dependency to the render task. This ensures that the render task is produced before the image that renders it if they are happening in the same frame. This mechanism relies on the item producing the render task to be traversed before the image that displays it (in other words, the picture must appear before the image in the display list).

§visited_pictures: &'a mut [bool]

Implementations§

Source§

impl<'a> FrameBuildingState<'a>

Source

pub fn current_dirty_region(&self) -> &DirtyRegion

Retrieve the current dirty region during primitive traversal.

Source

pub fn push_dirty_region(&mut self, region: DirtyRegion)

Push a new dirty region for child primitives to cull / clip against.

Source

pub fn pop_dirty_region(&mut self)

Pop the top dirty region from the stack.

Source

pub fn push_prim( &mut self, cmd: &PrimitiveCommand, spatial_node_index: SpatialNodeIndex, targets: &[CommandBufferIndex], )

Push a primitive command to a set of command buffers

Source

pub fn push_cmd( &mut self, cmd: &PrimitiveCommand, targets: &[CommandBufferIndex], )

Push a command to a set of command buffers

Source

pub fn set_segments( &mut self, segments: &[QuadSegment], targets: &[CommandBufferIndex], )

Set the active list of segments in a set of command buffers

Auto Trait Implementations§

§

impl<'a> Freeze for FrameBuildingState<'a>

§

impl<'a> !RefUnwindSafe for FrameBuildingState<'a>

§

impl<'a> !Send for FrameBuildingState<'a>

§

impl<'a> !Sync for FrameBuildingState<'a>

§

impl<'a> Unpin for FrameBuildingState<'a>

§

impl<'a> !UnwindSafe for FrameBuildingState<'a>

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.