Struct webrender::prim_store::PrimitiveScratchBuffer
source · pub struct PrimitiveScratchBuffer {Show 13 fields
pub clip_mask_instances: Vec<ClipMaskKind>,
pub glyph_keys: Storage<GlyphKey>,
pub border_cache_handles: Storage<RenderTaskId>,
pub segments: Storage<BrushSegment>,
pub segment_instances: Storage<SegmentedInstance>,
pub gradient_tiles: Storage<VisibleGradientTile>,
pub debug_items: Vec<DebugItem>,
messages: Vec<DebugMessage>,
pub required_sub_graphs: HashSet<PictureIndex, BuildHasherDefault<FxHasher>>,
pub quad_direct_segments: Vec<QuadSegment>,
pub quad_color_segments: Vec<QuadSegment>,
pub quad_indirect_segments: Vec<QuadSegment>,
pub quad_tile_classifier: QuadTileClassifier,
}
Expand description
Contains various vecs of data that is used only during frame building, where we want to recycle the memory each new display list, to avoid constantly re-allocating and moving memory around. Written during primitive preparation, and read during batching.
Fields§
§clip_mask_instances: Vec<ClipMaskKind>
Contains a list of clip mask instance parameters per segment generated.
glyph_keys: Storage<GlyphKey>
List of glyphs keys that are allocated by each text run instance.
border_cache_handles: Storage<RenderTaskId>
List of render task handles for border segment instances that have been added this frame.
segments: Storage<BrushSegment>
A list of brush segments that have been built for this scene.
segment_instances: Storage<SegmentedInstance>
A list of segment ranges and GPU cache handles for prim instances that have opted into segment building. In future, this should be removed in favor of segment building during primitive interning.
gradient_tiles: Storage<VisibleGradientTile>
A list of visible tiles that tiled gradients use to store per-tile information.
debug_items: Vec<DebugItem>
List of debug display items for rendering.
messages: Vec<DebugMessage>
List of current debug messages to log on screen
required_sub_graphs: HashSet<PictureIndex, BuildHasherDefault<FxHasher>>
Set of sub-graphs that are required, determined during visibility pass
quad_direct_segments: Vec<QuadSegment>
Temporary buffers for building segments in to during prepare pass
quad_color_segments: Vec<QuadSegment>
§quad_indirect_segments: Vec<QuadSegment>
§quad_tile_classifier: QuadTileClassifier
A retained classifier for checking which segments of a tiled primitive need a mask / are clipped / can be rendered directly
Implementations§
source§impl PrimitiveScratchBuffer
impl PrimitiveScratchBuffer
pub fn recycle(&mut self, recycler: &mut Recycler)
pub fn begin_frame(&mut self)
pub fn end_frame(&mut self)
pub fn push_debug_rect_with_stroke_width( &mut self, rect: WorldRect, border: ColorF, stroke_width: f32, )
pub fn push_debug_rect( &mut self, rect: DeviceRect, outer_color: ColorF, inner_color: ColorF, )
pub fn push_debug_string( &mut self, position: DevicePoint, color: ColorF, msg: String, )
pub fn log(&mut self, msg: String)
Trait Implementations§
source§impl Default for PrimitiveScratchBuffer
impl Default for PrimitiveScratchBuffer
Auto Trait Implementations§
impl Freeze for PrimitiveScratchBuffer
impl RefUnwindSafe for PrimitiveScratchBuffer
impl Send for PrimitiveScratchBuffer
impl Sync for PrimitiveScratchBuffer
impl Unpin for PrimitiveScratchBuffer
impl UnwindSafe for PrimitiveScratchBuffer
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
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>
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>
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