pub struct RetainedLedger {
pub entries: HashMap<u64, RetainedEntry>,
pub frame: u64,
}Expand description
The retained pages the renderer reported resident after a frame.
Fields§
§entries: HashMap<u64, RetainedEntry>Resident pages by raw RetainedKey.
frame: u64Paint serial of the last scene whose retained-store commit completed
(0 before any); a refused or failed frame does not advance it.
Implementations§
Source§impl RetainedLedger
impl RetainedLedger
Sourcepub fn from_entries(
frame: u64,
entries: impl IntoIterator<Item = (u64, (u32, u32), f32)>,
) -> Self
pub fn from_entries( frame: u64, entries: impl IntoIterator<Item = (u64, (u32, u32), f32)>, ) -> Self
From (key, extent_px, scale) triples, after serial frame committed.
Sourcepub fn covers(&self, serial: u64) -> bool
pub fn covers(&self, serial: u64) -> bool
frame >= serial; serial 0 (an unnumbered paint) is always covered.
Sourcepub fn is_resident(
&self,
key: RetainedKey,
extent_px: (u32, u32),
scale: f32,
) -> bool
pub fn is_resident( &self, key: RetainedKey, extent_px: (u32, u32), scale: f32, ) -> bool
Whether key is resident at exactly extent_px and scale (within 1e-3).
Trait Implementations§
Source§impl Clone for RetainedLedger
impl Clone for RetainedLedger
Source§impl Debug for RetainedLedger
impl Debug for RetainedLedger
Source§impl Default for RetainedLedger
impl Default for RetainedLedger
Source§impl PartialEq for RetainedLedger
impl PartialEq for RetainedLedger
impl StructuralPartialEq for RetainedLedger
Auto Trait Implementations§
impl Freeze for RetainedLedger
impl RefUnwindSafe for RetainedLedger
impl Send for RetainedLedger
impl Sync for RetainedLedger
impl Unpin for RetainedLedger
impl UnsafeUnpin for RetainedLedger
impl UnwindSafe for RetainedLedger
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,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.