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

Add Clone for dmabuf feedback structs #467

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

chrisduerr
Copy link
Contributor

@chrisduerr chrisduerr commented Sep 4, 2024

The DmabufHandler::dmabuf_feedback handler provides access to DMA buffer feedback, however working with this feedback becomes difficult when it needs to be stored in multiple places due to missing derives.

So this patch adds the automatic Clone derive so the existing types in SCTK can be reused downstream.

The DmabufFeedback itself does not implement Clones since it relies on the Mmap type, which is not cloneable.


Note I didn't actually require this myself since I was able to clone the WebKit type I used it for. But it seems useful for other people so I thought I might as well put up a PR.

The `DmabufHandler::dmabuf_feedback` handler provides access to DMA
buffer feedback, however working with this feedback becomes difficult
when it needs to be stored in multiple places due to missing derives.

So this patch adds the automatic `Clone` derive so the existing types in
SCTK can be reused downstream.

The `DmabufFeedback` itself does not implement `Clones` since it relies
on the `Mmap` type, which is not cloneable.
@PolyMeilex PolyMeilex merged commit 828c2c3 into Smithay:master Oct 16, 2024
7 checks passed
@PolyMeilex
Copy link
Member

Sounds like a good idea, sorry for the delay.

@chrisduerr chrisduerr deleted the feedback_derives branch October 16, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants