Struct wayland_protocols::presentation_time::server::wp_presentation_feedback::WpPresentationFeedback
source · [−]pub struct WpPresentationFeedback(_);
Implementations
sourceimpl WpPresentationFeedback
impl WpPresentationFeedback
sourcepub fn sync_output(&self, output: &WlOutput)
pub fn sync_output(&self, output: &WlOutput)
presentation synchronized to this output
As presentation can be synchronized to only one output at a time, this event tells which output it was. This event is only sent prior to the presented event.
As clients may bind to the same global wl_output multiple times, this event is sent for each bound instance that matches the synchronized output. If a client has not bound to the right wl_output global at all, this event is not sent.
sourcepub fn presented(
&self,
tv_sec_hi: u32,
tv_sec_lo: u32,
tv_nsec: u32,
refresh: u32,
seq_hi: u32,
seq_lo: u32,
flags: Kind
)
pub fn presented(
&self,
tv_sec_hi: u32,
tv_sec_lo: u32,
tv_nsec: u32,
refresh: u32,
seq_hi: u32,
seq_lo: u32,
flags: Kind
)
the content update was displayed
The associated content update was displayed to the user at the indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of the timestamp, see presentation.clock_id event.
The timestamp corresponds to the time when the content update turned into light the first time on the surface’s main output. Compositors may approximate this from the framebuffer flip completion events from the system, and the latency of the physical display path if known.
This event is preceded by all related sync_output events telling which output’s refresh cycle the feedback corresponds to, i.e. the main output for the surface. Compositors are recommended to choose the output containing the largest part of the wl_surface, or keeping the output they previously chose. Having a stable presentation output association helps clients predict future output refreshes (vblank).
The ‘refresh’ argument gives the compositor’s prediction of how many nanoseconds after tv_sec, tv_nsec the very next output refresh may occur. This is to further aid clients in predicting future refreshes, i.e., estimating the timestamps targeting the next few vblanks. If such prediction cannot usefully be done, the argument is zero.
If the output does not have a constant refresh rate, explicit video mode switches excluded, then the refresh argument must be zero.
The 64-bit value combined from seq_hi and seq_lo is the value of the output’s vertical retrace counter when the content update was first scanned out to the display. This value must be compatible with the definition of MSC in GLX_OML_sync_control specification. Note, that if the display path has a non-zero latency, the time instant specified by this counter may differ from the timestamp’s.
If the output does not have a concept of vertical retrace or a refresh cycle, or the output device is self-refreshing without a way to query the refresh count, then the arguments seq_hi and seq_lo must be zero.
Trait Implementations
sourceimpl Clone for WpPresentationFeedback
impl Clone for WpPresentationFeedback
sourcefn clone(&self) -> WpPresentationFeedback
fn clone(&self) -> WpPresentationFeedback
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WpPresentationFeedback
impl Debug for WpPresentationFeedback
sourceimpl From<WpPresentationFeedback> for Resource<WpPresentationFeedback>
impl From<WpPresentationFeedback> for Resource<WpPresentationFeedback>
sourcefn from(value: WpPresentationFeedback) -> Self
fn from(value: WpPresentationFeedback) -> Self
Converts to this type from the input type.
sourceimpl Interface for WpPresentationFeedback
impl Interface for WpPresentationFeedback
sourcefn c_interface() -> *const wl_interface
fn c_interface() -> *const wl_interface
Pointer to the C representation of this interface
sourceimpl PartialEq<WpPresentationFeedback> for WpPresentationFeedback
impl PartialEq<WpPresentationFeedback> for WpPresentationFeedback
sourcefn eq(&self, other: &WpPresentationFeedback) -> bool
fn eq(&self, other: &WpPresentationFeedback) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for WpPresentationFeedback
impl StructuralEq for WpPresentationFeedback
impl StructuralPartialEq for WpPresentationFeedback
Auto Trait Implementations
impl !RefUnwindSafe for WpPresentationFeedback
impl Send for WpPresentationFeedback
impl Sync for WpPresentationFeedback
impl Unpin for WpPresentationFeedback
impl !UnwindSafe for WpPresentationFeedback
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
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more