pub struct Round {
pub target: RoundTarget,
pub ops: Vec<RoundOp>,
pub released: Vec<PageParity>,
pub filter: Option<FilterPass>,
pub copy: Option<RegionCopy>,
pub samples: Vec<BackdropSample>,
}Expand description
One render pass over one target.
A target is not a round: the surface, and a layer’s page, can each take several, and the rounds of one target run in the order they are listed with every one after the first loading what the one before it left. The surface’s first round that draws is the one that clears it — the renderer folds the frame’s clear and its opaque strips into that round’s pass.
Fields§
§target: RoundTargetWhat this pass renders into.
ops: Vec<RoundOp>The pass’s work, in execution order. Empty on a filter round, which issues no draw and composites nothing.
released: Vec<PageParity>Pages whose contents this round consumed; they return to the pool once it completes.
filter: Option<FilterPass>The filter pass this round runs, on a filter round.
A field rather than a RoundOp variant, and it stays one now that the
renderer executes filter rounds: a filter round is only a filter pass
— it draws nothing and composites nothing, and it is drawn through a
different pipeline, off a different instance buffer, with no viewport
uniform and no strip bind groups. Naming it here is what lets the frame
path branch on the round before it starts issuing a list, and keeps
RoundOp exactly the set of things one strip pass can interleave.
copy: Option<RegionCopy>The region of the frame’s own target this round seeds its page with, on a region-copy round (see the module header’s Backdrop rounds).
A field rather than a RoundOp for the reason Self::filter is
one: a copy round is only a copy — it draws nothing, composites
nothing, and is recorded through no strip pipeline — and its ops are
empty.
samples: Vec<BackdropSample>The pages this round’s draws sample rather than composite: one per
backdrop blur whose rectangle this round draws, each holding the
blurred region (see the module header’s Backdrop rounds). Every page
named here is also in Self::released. Empty on every round of a
frame with no backdrop, and on every round but a surface one.
Implementations§
Source§impl Round
impl Round
Sourcepub fn page(&self) -> Option<&PageTarget>
pub fn page(&self) -> Option<&PageTarget>
The pooled page this round renders into, or None for the surface
and for a retained page.
Sourcepub fn retained(&self) -> Option<&RetainedTarget>
pub fn retained(&self) -> Option<&RetainedTarget>
The retained page this round renders a body into, if it does.
Sourcepub fn filter_pass(&self) -> Option<&FilterPass>
pub fn filter_pass(&self) -> Option<&FilterPass>
The filter pass this round runs, or None on an ordinary round.
Sourcepub fn region_copy(&self) -> Option<&RegionCopy>
pub fn region_copy(&self) -> Option<&RegionCopy>
The region this round copies into its page, or None on every round
but a region-copy one.
Sourcepub fn composites(&self) -> impl Iterator<Item = &Composite>
pub fn composites(&self) -> impl Iterator<Item = &Composite>
The composites this round performs, in execution order.
Sourcepub fn draw_count(&self) -> u32
pub fn draw_count(&self) -> u32
How many recorded draws this round issues.