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

Adapt wayland-cursor API to use less WlBuffers #310

Open
elinorbgr opened this issue May 2, 2020 · 0 comments
Open

Adapt wayland-cursor API to use less WlBuffers #310

elinorbgr opened this issue May 2, 2020 · 0 comments

Comments

@elinorbgr
Copy link
Member

The current API of wayland-cursor creates a wl_buffer (ondemand) for each image of the animation of every cursor. These buffers are kept alive for the whole lifetime of the app.

This is a bit wasteful in terms protocol resources, as it forces the server to keep the state of all these buffers in memory. In general it's good practice for wayland client to cleanup unused objects.

wayland-cursor should thus be changed to destroy the buffers when they receive a release() event from the server, and re-create them ondemand when they are needed.

This will probably require some changes to the the API of the crate though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant