pub struct PrimitiveFrameScratch {Show 19 fields
pub draws: Vec<PrimitiveDrawHeader>,
pub line_decoration: Storage<LineDecorationScratch>,
pub normal_border: Storage<NormalBorderScratch>,
pub backdrop_render: Storage<BackdropRenderScratch>,
pub pictures: Storage<PictureScratch>,
pub images: Storage<ImageScratch>,
pub visible_image_tiles: Storage<VisibleImageTile>,
pub text_runs: Storage<TextRunScratch>,
pub glyph_keys: Storage<GlyphKey>,
pub segments: Storage<BrushSegment>,
pub segment_instances: Storage<BrushSegmentation>,
pub border_task_ids: Storage<RenderTaskId>,
pub border_segments: Storage<BorderSegmentInfo>,
pub image_border: Storage<ImageBorderScratch>,
pub clip_mask_instances: Vec<ClipMaskKind>,
pub debug_items: Vec<DebugItem>,
pub required_sub_graphs: HashSet<PictureIndex, BuildHasherDefault<FxHasher>>,
pub quad_direct_segments: Vec<QuadSegment>,
pub quad_indirect_segments: Vec<QuadSegment>,
}Expand description
Per-frame scratch storage. All fields are cleared every frame in
begin_frame. Anything written here lives only for the current frame.
Fields§
§draws: Vec<PrimitiveDrawHeader>Per-frame draw headers, one entry per PrimitiveInstance.
Resized to prim_instances.len() at frame start and identity-
indexed by PrimitiveInstanceIndex.0 (a follow-up will switch
this to push-per-draw with Index<PrimitiveDrawHeader>). Holds
visibility state, clip chain and clip-task index for each
visible primitive.
line_decoration: Storage<LineDecorationScratch>Per-frame scratch for LineDecoration primitives.
normal_border: Storage<NormalBorderScratch>Per-frame scratch for NormalBorder primitives.
backdrop_render: Storage<BackdropRenderScratch>Per-frame scratch for BackdropRender primitives. Captures the source sub-graph render task id at prepare time so batch reads don’t reach into the source Picture’s per-frame state.
pictures: Storage<PictureScratch>Per-frame scratch for Picture primitives. Holds the picture’s
primary/secondary render task ids and any per-composite-mode
extra GPU buffer addresses. Indexed by scratch_handle on
PrimitiveKind::Picture.
images: Storage<ImageScratch>Per-frame scratch for Image primitives. Holds the source render task (or a Range of per-tile tasks for tiled images), normalized- uvs flag, and image adjustment.
visible_image_tiles: Storage<VisibleImageTile>Per-tile entries for tiled Image primitives. Each ImageScratch
holds a Range into this storage.
text_runs: Storage<TextRunScratch>Per-frame scratch for TextRun primitives. Holds the per-frame font snapshot, glyph-key range, snapping offset, and raster scale for each visible text run.
glyph_keys: Storage<GlyphKey>Per-frame storage for glyph keys allocated by visible text
runs. Each TextRunScratch holds a Range into this storage.
Used to be on PrimitiveSceneCache (memoized across frames);
graduated to per-frame here so the scene buffer cannot grow
unbounded between scene rebuilds.
segments: Storage<BrushSegment>A list of brush segments built each frame for the segmented brush primitives (Rectangle, YuvImage, non-tiled Image). The segment builder runs every frame for every visible segmented prim.
segment_instances: Storage<BrushSegmentation>A list of per-prim brush segmentation records (segments range
- GPU buffer address). Each PrimitiveDrawHeader.segment_instance_index holds an index into this storage, or UNUSED for non-segmented prims.
border_task_ids: Storage<RenderTaskId>Trailing-array store for per-segment cached render-task ids referenced by NormalBorderScratch entries.
border_segments: Storage<BorderSegmentInfo>Per-frame BorderSegmentInfo arena. NormalBorder builds its
edge/corner segment list each frame against the prim’s size and
stores the resulting range on NormalBorderScratch.
image_border: Storage<ImageBorderScratch>Per-frame scratch for ImageBorder primitives. Holds the range
into segments for the nine-patch brush segments built each
frame against the prim’s size.
clip_mask_instances: Vec<ClipMaskKind>Contains a list of clip mask instance parameters per segment generated.
debug_items: Vec<DebugItem>List of debug display items for rendering. Cleared in begin_frame
and refilled in end_frame (where retained messages are flushed
into it for on-screen display).
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_indirect_segments: Vec<QuadSegment>Implementations§
Source§impl PrimitiveFrameScratch
impl PrimitiveFrameScratch
pub fn recycle(&mut self, recycler: &mut Recycler)
pub fn begin_frame(&mut self)
Trait Implementations§
Source§impl Default for PrimitiveFrameScratch
impl Default for PrimitiveFrameScratch
Auto Trait Implementations§
impl Freeze for PrimitiveFrameScratch
impl RefUnwindSafe for PrimitiveFrameScratch
impl Send for PrimitiveFrameScratch
impl Sync for PrimitiveFrameScratch
impl Unpin for PrimitiveFrameScratch
impl UnsafeUnpin for PrimitiveFrameScratch
impl UnwindSafe for PrimitiveFrameScratch
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