summaryrefslogtreecommitdiff
path: root/src/wayland
diff options
context:
space:
mode:
authorErik Kurzinger <ekurzinger@nvidia.com>2019-03-05 23:39:15 +0000
committerErik Kurzinger <ekurzinger@nvidia.com>2019-03-14 14:39:52 -0700
commit056c45fe0c70fb09c2f0281dc6748f142bcdc033 (patch)
tree0d78e8c74e752b65ff87fc1a508fd4978cc3657b /src/wayland
parent2ac7f7f1e5bf6381430d0224e7ee51c701664a69 (diff)
downloadmutter-056c45fe0c70fb09c2f0281dc6748f142bcdc033.tar.gz
wayland/buffer: Try realizing EGLStream before EGLImage buffer
Currently, it is assumed that if querying the EGL_TEXTURE_FORMAT of a Wayland buffer succeeds it is an EGLImage. However, this assumption will no longer hold on upcoming versions of the NVIDIA EGL Wayland driver which will include support for querying this attribute for EGLStream buffers as well. Hence, we need to check if buffers are EGLStreams first. Fixes #488 https://gitlab.gnome.org/GNOME/mutter/merge_requests/477
Diffstat (limited to 'src/wayland')
-rw-r--r--src/wayland/meta-wayland-buffer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wayland/meta-wayland-buffer.c b/src/wayland/meta-wayland-buffer.c
index ac2eb98b7..f45679d3a 100644
--- a/src/wayland/meta-wayland-buffer.c
+++ b/src/wayland/meta-wayland-buffer.c
@@ -119,14 +119,6 @@ meta_wayland_buffer_realize (MetaWaylandBuffer *buffer)
return TRUE;
}
- if (meta_egl_query_wayland_buffer (egl, egl_display, buffer->resource,
- EGL_TEXTURE_FORMAT, &format,
- NULL))
- {
- buffer->type = META_WAYLAND_BUFFER_TYPE_EGL_IMAGE;
- return TRUE;
- }
-
#ifdef HAVE_WAYLAND_EGLSTREAM
stream = meta_wayland_egl_stream_new (buffer, NULL);
if (stream)
@@ -146,6 +138,14 @@ meta_wayland_buffer_realize (MetaWaylandBuffer *buffer)
}
#endif /* HAVE_WAYLAND_EGLSTREAM */
+ if (meta_egl_query_wayland_buffer (egl, egl_display, buffer->resource,
+ EGL_TEXTURE_FORMAT, &format,
+ NULL))
+ {
+ buffer->type = META_WAYLAND_BUFFER_TYPE_EGL_IMAGE;
+ return TRUE;
+ }
+
dma_buf = meta_wayland_dma_buf_from_buffer (buffer);
if (dma_buf)
{