Wayland++ 1.0.0
C++ Bindings for Wayland
|
presentation time feedback event More...
#include <wayland-server-protocol-extra.hpp>
Inherits wayland::server::resource_t.
Public Member Functions | |
void | sync_output (output_t const &output, bool post=true) |
presentation synchronized to this output | |
void | presented (uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, presentation_feedback_kind const &flags, bool post=true) |
the content update was displayed | |
void | discarded (bool post=true) |
the content update was not displayed | |
bool | proxy_has_object () const |
Check whether this wrapper actually wraps an object. | |
void | post_no_memory () const |
uint32_t | get_id () const |
client_t | get_client () const |
unsigned int | get_version () const |
std::string | get_class () |
Static Public Attributes | |
static constexpr std::uint32_t | sync_output_since_version = 1 |
Minimum protocol version required for the sync_output function. | |
static constexpr std::uint32_t | presented_since_version = 1 |
Minimum protocol version required for the presented function. | |
static constexpr std::uint32_t | discarded_since_version = 1 |
Minimum protocol version required for the discarded function. | |
presentation time feedback event
A presentation_feedback object returns an indication that a wl_surface content update has become visible to the user. One object corresponds to one content update submission (wl_surface.commit). There are two possible outcomes: the content update is presented to the user, and a presentation timestamp delivered; or, the user did not see the content update because it was superseded or its surface destroyed, and the content update is discarded.
Once a presentation_feedback object has delivered a 'presented' or 'discarded' event it is automatically destroyed.
Definition at line 214 of file wayland-server-protocol-extra.hpp.
void presentation_feedback_t::discarded | ( | bool | post = true | ) |
the content update was not displayed
The content update was never displayed to the user.
Definition at line 762 of file wayland-server-protocol-extra.cpp.
|
inherited |
Retrieve the interface name (class) of a resource object.
|
inherited |
Get the associated client
|
inherited |
Get the internal ID of the resource
|
inherited |
Get interface version
|
inherited |
Post "not enough memory" error to the client
If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance.
void presentation_feedback_t::presented | ( | uint32_t | tv_sec_hi, |
uint32_t | tv_sec_lo, | ||
uint32_t | tv_nsec, | ||
uint32_t | refresh, | ||
uint32_t | seq_hi, | ||
uint32_t | seq_lo, | ||
presentation_feedback_kind const & | flags, | ||
bool | post = true |
||
) |
the content update was displayed
tv_sec_hi | high 32 bits of the seconds part of the presentation timestamp |
tv_sec_lo | low 32 bits of the seconds part of the presentation timestamp |
tv_nsec | nanoseconds part of the presentation timestamp |
refresh | nanoseconds till next refresh |
seq_hi | high 32 bits of refresh counter |
seq_lo | low 32 bits of refresh counter |
flags | combination of 'kind' values |
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.
Definition at line 757 of file wayland-server-protocol-extra.cpp.
|
inherited |
Check whether this wrapper actually wraps an object.
void presentation_feedback_t::sync_output | ( | output_t const & | output, |
bool | post = true |
||
) |
presentation synchronized to this output
output | presentation 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.
Definition at line 752 of file wayland-server-protocol-extra.cpp.
|
staticconstexpr |
Minimum protocol version required for the discarded function.
Definition at line 325 of file wayland-server-protocol-extra.hpp.
|
staticconstexpr |
Minimum protocol version required for the presented function.
Definition at line 314 of file wayland-server-protocol-extra.hpp.
|
staticconstexpr |
Minimum protocol version required for the sync_output function.
Definition at line 256 of file wayland-server-protocol-extra.hpp.