summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2020-09-22 09:54:15 +0200
committerOlivier Fourdan <fourdan@gmail.com>2020-11-19 09:33:01 +0000
commit662b2bcb84d5782aff1b93732eb010b0b43e5706 (patch)
tree626c0896c9ed742ee7f2ffb2ce928df37459d0c9 /hw/xwayland
parente538601128c1a8bb4247a817da2bbb3f671811b3 (diff)
xwayland: Use the pixmap release callback with EGLStream
Commit 77658741 - "xwayland: Add buffer release callback" added an API to deal with Wayland buffer release callbacks. The EGLstream implementation has its own wl_buffer callback, move that to the buffer release API instead so we don't have to deal with Wayland buffers directly and match the other Xwayland pixmap backend implementations. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Tested-by: Erik Kurzinger <ekurzinger@nvidia.com>
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-glamor-eglstream.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index 06cc1ad2a..0bbffd50b 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -465,14 +465,14 @@ xwl_eglstream_queue_pending_stream(struct xwl_screen *xwl_screen,
}
static void
-xwl_eglstream_buffer_release_callback(void *data, struct wl_buffer *wl_buffer)
+xwl_eglstream_buffer_release_callback(void *data)
{
/* drop the reference we took in post_damage, freeing if necessary */
dixDestroyPixmap(data, 0);
}
static const struct wl_buffer_listener xwl_eglstream_buffer_release_listener = {
- xwl_eglstream_buffer_release_callback
+ xwl_pixmap_buffer_release_cb,
};
static void
@@ -511,6 +511,10 @@ xwl_eglstream_create_pending_stream(struct xwl_screen *xwl_screen,
&xwl_eglstream_buffer_release_listener,
pixmap);
+ xwl_pixmap_set_buffer_release_cb(pixmap,
+ xwl_eglstream_buffer_release_callback,
+ pixmap);
+
wl_eglstream_controller_attach_eglstream_consumer(
xwl_eglstream->controller, xwl_window->surface, xwl_pixmap->buffer);