pub struct Overlay { /* private fields */ }Expand description
The overlay’s instanced-quad pipeline plus reusable CPU scratch (rebuilt each frame with no steady-state allocation).
Implementations§
Source§impl Overlay
impl Overlay
Sourcepub fn new(device: &Device, surface_format: TextureFormat) -> Self
pub fn new(device: &Device, surface_format: TextureFormat) -> Self
Build the overlay pipeline and buffers on device.
Sourcepub fn render(
&mut self,
queue: &Queue,
encoder: &mut CommandEncoder,
view: &TextureView,
size: (u32, u32),
metrics: Metrics,
analysis: AnalysisMetrics,
tier: Tier,
demoted: bool,
frame_ms_samples: impl Iterator<Item = f32>,
)
pub fn render( &mut self, queue: &Queue, encoder: &mut CommandEncoder, view: &TextureView, size: (u32, u32), metrics: Metrics, analysis: AnalysisMetrics, tier: Tier, demoted: bool, frame_ms_samples: impl Iterator<Item = f32>, )
Composite the overlay over view. frame_ms_samples is the rolling
frame-time history (oldest first, milliseconds) for the sparkline, and
tier is the active quality tier, named in the readout (ADR-0045) — the
same preset looks different on different machines now, so which tier a run
resolved is diagnostics, not trivia. demoted marks a tier the frame-time
governor took back rather than one that was asked for.
Auto Trait Implementations§
impl Freeze for Overlay
impl !RefUnwindSafe for Overlay
impl Send for Overlay
impl Sync for Overlay
impl Unpin for Overlay
impl UnsafeUnpin for Overlay
impl !UnwindSafe for Overlay
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
Mutably borrows from an owned value. Read more