mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-08 01:58:03 +02:00
compositor: Try an immediate repaint if VRR enabled
When in VRR mode, repainting without a wait might happen instantly, so do it. This is likely not the best long term solution, but is ok for now while weston's vrr support is experimental. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
c7cf87fe85
commit
bfb2dfae63
1 changed files with 12 additions and 0 deletions
|
|
@ -4146,6 +4146,18 @@ weston_output_finish_frame(struct weston_output *output,
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* If we're doing game mode VRR, repainting right away
|
||||
* might be better than waiting, so try now.
|
||||
* TODO: Come up with some better handling...
|
||||
* We should probably try to use "repaint window" style behaviour
|
||||
* if we're scheduling a repaint during the vactive display
|
||||
* period, but try to render immediately if we're not.
|
||||
*/
|
||||
if (output->vrr_mode == WESTON_VRR_MODE_GAME) {
|
||||
output->next_repaint = now;
|
||||
goto out;
|
||||
}
|
||||
|
||||
timespec_add_nsec(&output->next_repaint, stamp, refresh_nsec);
|
||||
timespec_add_msec(&output->next_repaint, &output->next_repaint,
|
||||
-compositor->repaint_msec);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue