egl_dri2: fix EXT_image_dma_buf_import fds
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 8 Aug 2014 13:26:28 +0000 (16:26 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 14 Aug 2014 18:30:57 +0000 (21:30 +0300)
commit08264e5dad4df448e7718e782ad9077902089a07
treef081327999afe861274f57bf9c0e1eabd7d3727e
parent972e87ca30b4c4b7f6269e5f9fe8c5cb6356f744
egl_dri2: fix EXT_image_dma_buf_import fds

The EGL_EXT_image_dma_buf_import specification was revised (according to
its revision history) on Dec 5th, 2013, for EGL to not take ownership of
the file descriptors.

Do not close the file descriptors passed in to eglCreateImageKHR with
EGL_LINUX_DMA_BUF_EXT target.

It is assumed, that the drivers, which ultimately process the file
descriptors, do not close or modify them in any way either. This avoids
the need to dup(), as it seems we would only need to just close the
dup'd file descriptors right after.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76188
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/egl/drivers/dri2/egl_dri2.c