mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
compositor: store frame flags from finish frame
These are used to determine if the previous frame was displayed with tearing, which is useful in determining when the next frame time should be. Store these as a step towards breaking the frame time calculations out of output_finish_frame into a separate function. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
f1bcedd089
commit
01b7e9d015
2 changed files with 3 additions and 0 deletions
|
|
@ -445,6 +445,7 @@ struct weston_output {
|
|||
struct wl_signal destroy_signal; /**< sent when disabled */
|
||||
struct weston_coord_global move;
|
||||
struct timespec frame_time; /* presentation timestamp */
|
||||
uint32_t frame_flags; /* presentation flags */
|
||||
uint64_t msc; /* media stream counter */
|
||||
int disable_planes;
|
||||
int destroying;
|
||||
|
|
|
|||
|
|
@ -4154,6 +4154,7 @@ weston_output_finish_frame(struct weston_output *output,
|
|||
if (!stamp) {
|
||||
output->next_repaint = now;
|
||||
output->next_present = now;
|
||||
output->frame_flags = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -4172,6 +4173,7 @@ weston_output_finish_frame(struct weston_output *output,
|
|||
}
|
||||
|
||||
output->frame_time = *stamp;
|
||||
output->frame_flags = presented_flags;
|
||||
|
||||
/* If we're tearing just repaint right away */
|
||||
if (presented_flags & WESTON_FINISH_FRAME_TEARING) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue