summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2023-03-23 14:31:04 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2023-04-03 11:46:15 +0200
commit81458a86bf9320a6d40d5cba64f66840f15eb26c (patch)
tree19d6bb7acf6f201927b6bcd3f570601a8a6750ee
parent684580d06f9ea0724d4da9a4876509909b0fa791 (diff)
xwayland: Recycle buffers when dmabuf feedback changes
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 <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-rw-r--r--hw/xwayland/xwayland-glamor.c6
1 files changed, 6 insertions, 0 deletions
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 <sys/mman.h>
@@ -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