From 81458a86bf9320a6d40d5cba64f66840f15eb26c Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Thu, 23 Mar 2023 14:31:04 +0100 Subject: xwayland: Recycle buffers when dmabuf feedback changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Whenever the linux-dmabuf v4 feedback changes, we need to recreate the existing buffers so they use the current linux-dmabuf v4 feedback. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/xwayland-glamor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index b714f9be0..792af6144 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -43,6 +43,7 @@ #include "xwayland-glx.h" #include "xwayland-screen.h" #include "xwayland-window.h" +#include "xwayland-window-buffers.h" #include @@ -757,6 +758,11 @@ xwl_window_dmabuf_feedback_done(void *data, DebugF("XWAYLAND: Window 0x%x can%s get implicit scanout support\n", xwl_window->window->drawable.id, xwl_window->has_implicit_scanout_support ? "" : "not"); + + /* If the linux-dmabuf v4 per-surface feedback changed, recycle the + * window buffers so that they get re-created with appropriate parameters. + */ + xwl_window_buffers_recycle(xwl_window); } static void -- cgit v1.2.1