Skip to content
Snippets Groups Projects
Commit bfb2dfae authored by Derek Foreman's avatar Derek Foreman Committed by Marius Vlad
Browse files

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: default avatarDerek Foreman <derek.foreman@collabora.com>
parent c7cf87fe
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment