#[non_exhaustive]pub enum FrameEvent {
Sync,
Complete,
}Expand description
Identifiers that are passed to CoglFrameCallback functions
(registered using Onscreen::add_frame_callback) that
mark the progression of a frame in some way which usually
means that new information will have been accumulated in the
frame’s corresponding FrameInfo object.
The last event that will be sent for a frame will be a
FrameEvent::Complete event and so these are a good
opportunity to collect statistics about a frame since the
FrameInfo should hold the most data at this point.
<note>A frame may not be completed before the next frame can start
so applications should avoid needing to collect all statistics for
a particular frame before they can start a new frame.</note>
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sync
Notifies that the system compositor has acknowledged a frame and is ready for a new frame to be created.
Complete
Notifies that a frame has ended. This
is a good time for applications to
collect statistics about the frame
since the FrameInfo should hold
the most data at this point. No other
events should be expected after a
FrameEvent::Complete event.
Trait Implementations§
Source§impl Clone for FrameEvent
impl Clone for FrameEvent
Source§fn clone(&self) -> FrameEvent
fn clone(&self) -> FrameEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FrameEvent
impl Debug for FrameEvent
Source§impl Display for FrameEvent
impl Display for FrameEvent
Source§impl Hash for FrameEvent
impl Hash for FrameEvent
Source§impl Ord for FrameEvent
impl Ord for FrameEvent
Source§fn cmp(&self, other: &FrameEvent) -> Ordering
fn cmp(&self, other: &FrameEvent) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for FrameEvent
impl PartialEq for FrameEvent
Source§fn eq(&self, other: &FrameEvent) -> bool
fn eq(&self, other: &FrameEvent) -> bool
self and other values to be equal, and is used by ==.