Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repaint scheduling ("max_render_time") broken #4768

Closed
kennylevinsen opened this issue Nov 29, 2019 · 0 comments
Closed

Repaint scheduling ("max_render_time") broken #4768

kennylevinsen opened this issue Nov 29, 2019 · 0 comments
Labels
bug Not working as intended

Comments

@kennylevinsen
Copy link
Member

There are known issues with repaint scheduling. Offsetting frame_done to occur before output_render is not currently possible without causing issues.

This issue stem from interactions with the block_idle_frame. A fix was made in master that makes an output max_render_time work, but it does not improve the situation where a view max_render_time is also in effect.

@emersion emersion added the bug Not working as intended label Nov 29, 2019
kennylevinsen added a commit to kennylevinsen/sway that referenced this issue Nov 30, 2019
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 swaywm#4768
kennylevinsen added a commit to kennylevinsen/sway that referenced this issue Nov 30, 2019
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 swaywm#4768
kennylevinsen added a commit to kennylevinsen/sway that referenced this issue Nov 30, 2019
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 swaywm#4768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

2 participants