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

Support linux-dmabuf exports in wpe_view_backend_exportable_fdo_client #55

Merged
merged 1 commit into from Jul 9, 2019

Conversation

@zdobersek
Copy link
Contributor

commented Jul 8, 2019

Add the export_dmabuf_resource callback to the
wpe_view_backend_exportable_fdo_client interface. This callback provides an
wpe_view_backend_exportable_fdo_dmabuf_resource object that describes the
linux-dmabuf resource that's being exported.

The originating wl_resource is included in this new descriptor struct in order
to enable the application to release the resource through the existing
wpe_view_backend_exportable_fdo_dispatch_release_buffer() API. Other members of
the descriptor struct provide all the available information about the dmabuf
to enable reusing it through various other APIs like libgbm.

Support linux-dmabuf exports in wpe_view_backend_exportable_fdo_client
Add the export_dmabuf_resource callback to the
wpe_view_backend_exportable_fdo_client interface. This callback provides an
wpe_view_backend_exportable_fdo_dmabuf_resource object that describes the
linux-dmabuf resource that's being exported.

The originating wl_resource is included in this new descriptor struct in order
to enable the application to release the resource through the existing
wpe_view_backend_exportable_fdo_dispatch_release_buffer() API. Other members of
the descriptor struct provide all the available information about the dmabuf
to enable reusing it through various other APIs like libgbm.

@zdobersek zdobersek requested a review from aperezdc Jul 8, 2019

@aperezdc
Copy link
Member

left a comment

Patch looks good to me, thanks! I just have a small doubt before pressing “Merge” for this PR 🙂

uint32_t height;
uint32_t format;
uint8_t n_planes;
int32_t fds[4];

This comment has been minimized.

Copy link
@aperezdc

aperezdc Jul 8, 2019

Member

File descriptors should be of type int—which is the type used all around by the operating system for them. Is there some reason to use int32_t here instead?

This comment has been minimized.

Copy link
@zdobersek

zdobersek Jul 9, 2019

Author Contributor

This comment has been minimized.

Copy link
@aperezdc

aperezdc Jul 9, 2019

Member

Fair enough 🙂

Let's merge this as-is for now, and I filed #56 as a cleanup to be done later on.

This comment has been minimized.

Copy link
@zdobersek

zdobersek Jul 9, 2019

Author Contributor

But Weston's implementation of linux_dmabuf_attributes is int, it was us who converted it to int32_t when the linux-dmabuf code was adopted.

@aperezdc aperezdc merged commit 4a49c05 into master Jul 9, 2019

@zdobersek zdobersek deleted the zdobersek/dmabuf-callback branch Jul 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.