pub struct IsolatedDowngradeCounts {
pub blur_radius_clamped: u32,
pub surface_px_clamped: u32,
pub bytes_budget_skipped: u32,
pub oversized_bounds: u32,
pub backdrop_radius_clamped: u32,
pub backdrop_budget_skipped: u32,
pub blend_capture_budget_skipped: u32,
}Expand description
Per-reason downgrade counters for the current frame.
Counters use u32 and are reset for each planned frame.
§Examples
use ailloli_ui_render_wgpu::IsolatedDowngradeCounts;
let counts = IsolatedDowngradeCounts::default();
assert_eq!(counts.total(), 0);Fields§
§blur_radius_clamped: u32Number of content-blur clamps.
surface_px_clamped: u32Number of surface-area clamps.
bytes_budget_skipped: u32Number of byte-budget pass skips.
oversized_bounds: u32Number of invalid or oversized bounds rejections.
backdrop_radius_clamped: u32Number of backdrop-radius clamps.
backdrop_budget_skipped: u32Number of backdrop-capture skips.
blend_capture_budget_skipped: u32Number of blend destination-capture skips.
Implementations§
Source§impl IsolatedDowngradeCounts
impl IsolatedDowngradeCounts
Sourcepub fn total(&self) -> u32
pub fn total(&self) -> u32
Sums all downgrade counters.
§Panics
Debug builds panic if the sum exceeds u32::MAX; normal planner limits
keep the counters far below that bound.
§Examples
use ailloli_ui_render_wgpu::IsolatedDowngradeCounts;
let counts = IsolatedDowngradeCounts { blur_radius_clamped: 2, ..Default::default() };
assert_eq!(counts.total(), 2);Sourcepub fn record(&mut self, reason: IsolatedDowngradeReason)
pub fn record(&mut self, reason: IsolatedDowngradeReason)
Increments the counter associated with reason by one.
§Panics
Debug builds panic if that u32 counter is already u32::MAX.
§Examples
use ailloli_ui_render_wgpu::{IsolatedDowngradeCounts, IsolatedDowngradeReason};
let mut counts = IsolatedDowngradeCounts::default();
counts.record(IsolatedDowngradeReason::SurfacePxClamped);
assert_eq!(counts.surface_px_clamped, 1);Trait Implementations§
Source§impl Clone for IsolatedDowngradeCounts
impl Clone for IsolatedDowngradeCounts
Source§fn clone(&self) -> IsolatedDowngradeCounts
fn clone(&self) -> IsolatedDowngradeCounts
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IsolatedDowngradeCounts
impl Debug for IsolatedDowngradeCounts
Source§impl Default for IsolatedDowngradeCounts
impl Default for IsolatedDowngradeCounts
Source§fn default() -> IsolatedDowngradeCounts
fn default() -> IsolatedDowngradeCounts
Returns the “default value” for a type. Read more
impl Copy for IsolatedDowngradeCounts
Auto Trait Implementations§
impl Freeze for IsolatedDowngradeCounts
impl RefUnwindSafe for IsolatedDowngradeCounts
impl Send for IsolatedDowngradeCounts
impl Sync for IsolatedDowngradeCounts
impl Unpin for IsolatedDowngradeCounts
impl UnwindSafe for IsolatedDowngradeCounts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
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>
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 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>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().