Commit b1006684 authored by Alexandros Frantzis's avatar Alexandros Frantzis

clients: Add simple-dmabuf-egl

Add a client that uses EGL/GLESv2 to draw to dmabuf buffers, utilizing
EGLImages and FBOs. The client uses GBM to create the dmabufs buffers.

The simple-dmabuf-egl client is partly based on patch [1] that changes
dmabuf clients to use GBM instead of libdrm code, but has been greatly
simplified since in this case we don't require direct pixel access or
non-RGBA formats.

[1] https://patchwork.freedesktop.org/patch/239796/Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
parent a0d9cc64
......@@ -680,6 +680,20 @@ weston_simple_dmabuf_v4l_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_V4L_CLIENT_CFLAGS
weston_simple_dmabuf_v4l_LDADD = $(SIMPLE_DMABUF_V4L_CLIENT_LIBS) libshared.la
endif
if BUILD_SIMPLE_DMABUF_EGL_CLIENT
demo_clients += weston-simple-dmabuf-egl
weston_simple_dmabuf_egl_SOURCES = clients/simple-dmabuf-egl.c
nodist_weston_simple_dmabuf_egl_SOURCES = \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/fullscreen-shell-unstable-v1-protocol.c \
protocol/fullscreen-shell-unstable-v1-client-protocol.h \
protocol/linux-dmabuf-unstable-v1-protocol.c \
protocol/linux-dmabuf-unstable-v1-client-protocol.h
weston_simple_dmabuf_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_DMABUF_EGL_CLIENT_CFLAGS)
weston_simple_dmabuf_egl_LDADD = $(SIMPLE_DMABUF_EGL_CLIENT_LIBS) libshared.la
endif
noinst_LTLIBRARIES += libtoytoolkit.la
libtoytoolkit_la_SOURCES = \
......
......@@ -48,6 +48,25 @@ simple_clients = [
],
'dep_objs': [ dep_wayland_client, dep_libshared ]
},
{
'name': 'dmabuf-egl',
'sources': [
'simple-dmabuf-egl.c',
linux_dmabuf_unstable_v1_client_protocol_h,
linux_dmabuf_unstable_v1_protocol_c,
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
fullscreen_shell_unstable_v1_client_protocol_h,
fullscreen_shell_unstable_v1_protocol_c,
],
'dep_objs': [
dep_wayland_client,
dep_libdrm_headers,
dep_gbm,
dep_egl,
dep_glesv2
]
},
{
'name': 'dmabuf-v4l',
'sources': [
......
This diff is collapsed.
......@@ -451,6 +451,21 @@ if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
fi
AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
AC_ARG_ENABLE(simple-dmabuf-egl-client,
AS_HELP_STRING([--disable-simple-dmabuf-egl-client],
[do not build the simple dmabuf egl client]),,
enable_simple_dmabuf_egl_client="auto")
if ! test "x$enable_simple_dmabuf_egl_client" = "xno"; then
PKG_CHECK_MODULES(SIMPLE_DMABUF_EGL_CLIENT, [wayland-client libdrm gbm egl glesv2],
[have_simple_dmabuf_egl_client=yes], [have_simple_dmabuf_egl_client=no])
if test "x$have_simple_dmabuf_egl_client" = "xno" -a "x$enable_simple_dmabuf_egl_client" = "xyes"; then
AC_MSG_ERROR([EGL dmabuf client explicitly enabled, but libdrm/egl/glev2 couldn't be found])
fi
enable_simple_dmabuf_egl_client="$have_simple_dmabuf_egl_client"
fi
AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_EGL_CLIENT, test "x$enable_simple_dmabuf_egl_client" = "xyes")
AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes)
AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
have_cairo_egl=no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment