diff options
author | Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> | 2015-11-24 19:28:24 +0000 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2015-12-02 16:50:15 -0600 |
commit | c399692b8ea07938623b22918d1fe279cded18a1 (patch) | |
tree | 4c98f9b37ae6e82dc1350ca39d85d8c6791efee9 /src/compositor-drm.c | |
parent | 6207b6af095dc8fa42abfab053fae216212d56bd (diff) | |
download | weston-c399692b8ea07938623b22918d1fe279cded18a1.tar.gz |
linux-dmabuf: Move the attributes part of linux_dmabuf_buffer into its own struct
This allows renderers to use that struct to create their own dmabufs,
in case they can’t import the one provided by the client directly but
know how to convert it into a format they can render.
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D332
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Diffstat (limited to 'src/compositor-drm.c')
-rw-r--r-- | src/compositor-drm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 4f9bbaff..ea6f3cdf 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -983,14 +983,14 @@ drm_output_prepare_overlay_view(struct drm_output *output, * support a mix of gbm_bos and drmfbs. */ struct gbm_import_fd_data gbm_dmabuf = { - .fd = dmabuf->dmabuf_fd[0], - .width = dmabuf->width, - .height = dmabuf->height, - .stride = dmabuf->stride[0], - .format = dmabuf->format + .fd = dmabuf->attributes.fd[0], + .width = dmabuf->attributes.width, + .height = dmabuf->attributes.height, + .stride = dmabuf->attributes.stride[0], + .format = dmabuf->attributes.format }; - if (dmabuf->n_planes != 1 || dmabuf->offset[0] != 0) + if (dmabuf->attributes.n_planes != 1 || dmabuf->attributes.offset[0] != 0) return NULL; bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_FD, &gbm_dmabuf, |