pub struct SurfacePresentState { /* private fields */ }Expand description
Surface generation and submission-outcome tracker retaining full pending frames across transient presentation failures.
Implementations§
Source§impl SurfacePresentState
Surface generation and retry bookkeeping operations for SurfacePresentState.
impl SurfacePresentState
Surface generation and retry bookkeeping operations for SurfacePresentState.
Sourcepub fn record_skipped_no_damage(&mut self)
pub fn record_skipped_no_damage(&mut self)
Records an idle tick skipped due to zero damage.
§Arguments
&Self- Mutable surface presentation tracker.
Sourcepub fn record_submitted(&mut self, present_timestamp_ns: Option<u64>)
pub fn record_submitted(&mut self, present_timestamp_ns: Option<u64>)
Records a successful frame submission with an optional monotonic presentation timestamp in nanoseconds.
§Arguments
&Self- Mutable surface presentation tracker.Option<u64>- Optional monotonic presentation timestamp in nanoseconds.
Sourcepub fn record_submit_failed(&mut self)
pub fn record_submit_failed(&mut self)
Records a failed frame submission and arms automatic full-frame retry on the current surface generation.
§Arguments
&Self- Mutable surface presentation tracker.
Sourcepub fn advance_surface_generation(&mut self) -> u64
pub fn advance_surface_generation(&mut self) -> u64
Sourcepub fn should_retry_same_generation(&self) -> bool
pub fn should_retry_same_generation(&self) -> bool
Source§impl SurfacePresentState
impl SurfacePresentState
pub fn get_surface_generation(&self) -> u64
pub fn get_mut_surface_generation(&mut self) -> &mut u64
pub fn set_surface_generation(&mut self, val: u64) -> &mut Self
pub fn get_last_outcome(&self) -> FrameSubmitOutcome
pub fn get_mut_last_outcome(&mut self) -> &mut FrameSubmitOutcome
pub fn set_last_outcome(&mut self, val: FrameSubmitOutcome) -> &mut Self
pub fn get_pending_retry_generation(&self) -> u64
pub fn get_mut_pending_retry_generation(&mut self) -> &mut u64
pub fn set_pending_retry_generation(&mut self, val: u64) -> &mut Self
pub fn get_has_pending_retry(&self) -> bool
pub fn get_mut_has_pending_retry(&mut self) -> &mut bool
pub fn set_has_pending_retry(&mut self, val: bool) -> &mut Self
pub fn get_retry_attempts(&self) -> u32
pub fn get_mut_retry_attempts(&mut self) -> &mut u32
pub fn set_retry_attempts(&mut self, val: u32) -> &mut Self
pub fn get_total_submitted(&self) -> u64
pub fn get_mut_total_submitted(&mut self) -> &mut u64
pub fn set_total_submitted(&mut self, val: u64) -> &mut Self
pub fn get_total_skipped(&self) -> u64
pub fn get_mut_total_skipped(&mut self) -> &mut u64
pub fn set_total_skipped(&mut self, val: u64) -> &mut Self
pub fn get_total_failed(&self) -> u64
pub fn get_mut_total_failed(&mut self) -> &mut u64
pub fn set_total_failed(&mut self, val: u64) -> &mut Self
pub fn get_last_present_timestamp_ns(&self) -> u64
pub fn get_mut_last_present_timestamp_ns(&mut self) -> &mut u64
pub fn set_last_present_timestamp_ns(&mut self, val: u64) -> &mut Self
pub fn get_has_present_timestamp(&self) -> bool
pub fn get_mut_has_present_timestamp(&mut self) -> &mut bool
pub fn set_has_present_timestamp(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for SurfacePresentState
impl Clone for SurfacePresentState
impl Copy for SurfacePresentState
Source§impl Debug for SurfacePresentState
impl Debug for SurfacePresentState
Source§impl Default for SurfacePresentState
impl Default for SurfacePresentState
impl Eq for SurfacePresentState
Source§impl Hash for SurfacePresentState
impl Hash for SurfacePresentState
Source§impl PartialEq for SurfacePresentState
impl PartialEq for SurfacePresentState
impl StructuralPartialEq for SurfacePresentState
Auto Trait Implementations§
impl Forget for SurfacePresentState
impl Freeze for SurfacePresentState
impl Move for SurfacePresentState
impl RefUnwindSafe for SurfacePresentState
impl Send for SurfacePresentState
impl Sync for SurfacePresentState
impl Unpin for SurfacePresentState
impl UnsafeUnpin for SurfacePresentState
impl UnwindSafe for SurfacePresentState
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