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

Wayland frame requests without rendering #3977

Open
mahkoh opened this issue Oct 31, 2024 · 2 comments
Open

Wayland frame requests without rendering #3977

mahkoh opened this issue Oct 31, 2024 · 2 comments
Labels
DS - wayland S - enhancement Wouldn't this be the coolest?

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Oct 31, 2024

Description

For event-driven applications it is sometimes desirable to always render in response to frame request callbacks. Currently there is no way to ensure the delivery of a frame callback without either presenting via the WSI or manually performing wayland requests.

It is already possible to create frame requests at any point. But winit provides no API to commit such a frame request.

Relevant platforms

Wayland

@mahkoh mahkoh added the S - enhancement Wouldn't this be the coolest? label Oct 31, 2024
@kchibisov
Copy link
Member

From what I remember it was recommended to not do so, and if you draw from idle you should draw immediately since frame callbacks don't help here?

I generally don't mind it once we have a a direct access to wayland backend.

@mahkoh
Copy link
Contributor Author

mahkoh commented Nov 3, 2024

Frame callbacks can be used to pace animation. If each animation frame causes damage, then this works with winit. But if an animation does not cause damage, then you have no way to pace the next animation frame.

It would be possible to work around this by getting the refresh rate of the surface (from presentation feedback). But winit does not provide this information either.

@kchibisov kchibisov added this to the Version 0.31.0 milestone Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS - wayland S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

2 participants