diff options
author | Kenny Levinsen <kl@kl.wtf> | 2019-11-30 16:29:39 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-01 12:44:07 +0100 |
commit | d1eab10266eabbcb33eeb9178491234d059dbe99 (patch) | |
tree | 4a39fd7618a54e012688a9ab33d6e961b47333d2 /include/sway | |
parent | 57f615e122fc0c4d4d5665f7e26c276be6b3ee00 (diff) |
output: Schedule idle frames if we do not render
Repaint scheduling delays output render and frame done events from
output frame events, and block idle frame events from being scheduled in
between output frame done and output render in this period of time.
If a surface is committed after its frame done event, but before output
render, idle frame requests will be blocked, and the surface relies on
the upcoming render to schedule a frame.
If when the repaint timer expires, output render is deemed unnecessary,
no frame will be scheduled. This can lead to surfaces never having their
frame callbacks fire.
To fix this, we store that a surface has requested a frame in
surface_needs_frame. When the repaint expires, if no render is deemed
necessary, we check this flag and schedule an idle frame.
Fixes #4768
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/output.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index bc03f4c5..b1c74258 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -57,6 +57,7 @@ struct sway_output { uint32_t refresh_nsec; int max_render_time; // In milliseconds struct wl_event_source *repaint_timer; + bool surface_needs_frame; }; struct sway_output *output_create(struct wlr_output *wlr_output); |