pub struct FrameInfo { /* private fields */ }
Implementations
sourceimpl FrameInfo
impl FrameInfo
pub fn new() -> Self
sourcepub fn frame_counter(&self) -> i64
pub fn frame_counter(&self) -> i64
Gets the frame counter for the Onscreen
that corresponds
to this frame.
Returns
The frame counter value
sourcepub fn output(&self) -> &Option<Output>
pub fn output(&self) -> &Option<Output>
Gets the Output
that the swapped frame was presented to.
Returns
The Output
that the frame was
presented to, or None
if this could not be determined.
sourcepub fn presentation_time(&self) -> i64
pub fn presentation_time(&self) -> i64
Gets the presentation time for the frame. This is the time at which the frame became visible to the user.
The presentation time measured in nanoseconds is based on a monotonic time source. The time source is not necessarily correlated with system/wall clock time and may represent the time elapsed since some undefined system event such as when the system last booted.
Linux kernel version less that 3.8 can result in non-monotonic timestamps being reported when using a drm based OpenGL driver. Also some buggy Mesa drivers up to 9.0.1 may also incorrectly report non-monotonic timestamps.
Returns
the presentation time for the frame
sourcepub fn refresh_rate(&self) -> f32
pub fn refresh_rate(&self) -> f32
Gets the refresh rate in Hertz for the output that the frame was on at the time the frame was presented.
Some platforms can’t associate a Output
with a
FrameInfo
object but are able to report a refresh rate via
this api. Therefore if you need this information then this api is
more reliable than using FrameInfo::get_output
followed by
Output::get_refresh_rate
.
Returns
the refresh rate in Hertz
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FrameInfo
impl Send for FrameInfo
impl Sync for FrameInfo
impl Unpin for FrameInfo
impl UnwindSafe for FrameInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.