Skip to main content

WgpuMemoryStats

Struct WgpuMemoryStats 

Source
pub struct WgpuMemoryStats {
Show 23 fields pub glyph_atlas_size: u32, pub glyph_atlas_bytes: usize, pub glyph_atlas_entries: usize, pub glyph_atlas_occupancy: f32, pub sprite_atlas_size: u32, pub sprite_atlas_bytes: usize, pub sprite_atlas_entries: usize, pub sprite_atlas_occupancy: f32, pub ramp_atlas_bytes: usize, pub instance_buf_bytes: usize, pub uploaded_primitives_cpu_bytes: usize, pub layer_pool_targets: usize, pub layer_pool_target_bytes: usize, pub layer_pool_masks: usize, pub layer_pool_mask_bytes: usize, pub canvas_scenes: usize, pub canvas_gpu_bytes: usize, pub slug_cached_glyphs: usize, pub slug_gpu_bytes: usize, pub slug_last_drawn_glyphs: usize, pub text_layout_cache_entries: usize, pub backdrop_blur_cache_hits: u64, pub backdrop_blur_cache_misses: u64,
}
Expand description

WgpuRenderer GPU 与伴随 CPU 缓存字节统计快照(用于四层内存账本剖析)。

Fields§

§glyph_atlas_size: u32§glyph_atlas_bytes: usize§glyph_atlas_entries: usize§glyph_atlas_occupancy: f32§sprite_atlas_size: u32§sprite_atlas_bytes: usize§sprite_atlas_entries: usize§sprite_atlas_occupancy: f32§ramp_atlas_bytes: usize§instance_buf_bytes: usize§uploaded_primitives_cpu_bytes: usize§layer_pool_targets: usize§layer_pool_target_bytes: usize§layer_pool_masks: usize§layer_pool_mask_bytes: usize§canvas_scenes: usize§canvas_gpu_bytes: usize§slug_cached_glyphs: usize§slug_gpu_bytes: usize§slug_last_drawn_glyphs: usize§text_layout_cache_entries: usize§backdrop_blur_cache_hits: u64§backdrop_blur_cache_misses: u64

Implementations§

Source§

impl WgpuMemoryStats

Source

pub const fn total_gpu_bytes(&self) -> usize

估算该渲染器持有的全部 GPU 纹理与缓冲总字节。

Trait Implementations§

Source§

impl Clone for WgpuMemoryStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for WgpuMemoryStats

Source§

impl Debug for WgpuMemoryStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WgpuMemoryStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for WgpuMemoryStats

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WgpuMemoryStats

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> FluentBuilder for T

Source§

fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self

当 condition 为 true 时执行闭包修饰自身,否则原样返回。
Source§

fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self

根据 condition 在两个修饰分支之间二选一。
Source§

fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self

当 option 为 Some(value) 时执行闭包修饰自身,否则原样返回。
Source§

fn when_none<O>( self, option: &Option<O>, then: impl FnOnce(Self) -> Self, ) -> Self

当 option 为 None 时执行闭包修饰自身,否则原样返回。
Source§

fn apply<U>(self, f: impl FnOnce(Self) -> U) -> U

通用管道映射变换(避免与 Iterator::map / Option::map 重名)。
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,