xserver-multidpi/hw/xwayland
Olivier Fourdan e19bf86c17 xwayland/eglstream: Keep a reference to the pixmap
Commit affc47452 - "xwayland: Drop the separate refcount for the
xwl_pixmap" removed the separate reference counter for the xwl_pixmap
which holds the EGLStream.

While that works fine for the common case, if the window's pixmap is
changed before the stream is ready, the older pixmap will be destroyed
and the xwl_pixmap along with it, even if the compositor is still using
the stream.

The code that was removed with commit affc47452 was taking care of that
by increasing the separate reference counter for the xwl_pixmap, but it
no longer the case.

As a result, we may end up with the EGL stream in the wrong state when
trying to use it, which will cascade down into all sort of issues.

To avoid the problem, increase the reference count on the pixmap when it
is marked as invalid in EGLStream's SetWindowPixmap().

This way, the xwl_pixmap and the EGLStream are kept until released by
the compositor, even when the pixmap changes before stream is ready.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: affc47452 xwayland: Drop the separate refcount for the xwl_pixmap
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
2021-05-11 14:08:58 +02:00
..
man xwayland: Add -verbose option as in xfree86 2021-01-29 10:02:14 +00:00
.gitignore xwayland: Add wp_viewport wayland extension support 2019-10-12 12:19:14 +02:00
drm.xml wayland: Sync drm.xml with Mesa 2017-07-05 10:13:04 -04:00
Makefile.am mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
meson.build xwayland: Fix path in pkg-config with autoconf 2021-03-05 11:11:54 +01:00
xwayland-cursor.c xwayland: Check buffer prior to attaching it 2021-05-11 14:08:58 +02:00
xwayland-cursor.h xwayland: Move Xwayland cursor declarations 2019-12-20 16:19:01 +01:00
xwayland-cvt.c xwayland: Cleanup and remove xwayland.h 2019-12-20 16:19:01 +01:00
xwayland-cvt.h xwayland: Move Xwayland CVT declaration 2019-12-20 16:19:01 +01:00
xwayland-glamor-eglstream.c xwayland/eglstream: Keep a reference to the pixmap 2021-05-11 14:08:58 +02:00
xwayland-glamor-gbm.c xwayland: implement pixmap_from_buffers for the eglstream backend 2021-04-09 14:00:01 +00:00
xwayland-glamor-xv.c xwayland: Cleanup and remove xwayland.h 2019-12-20 16:19:01 +01:00
xwayland-glamor.c xwayland/glamor: Add return status to post_damage 2021-05-11 14:08:58 +02:00
xwayland-glamor.h xwayland/glamor: Add return status to post_damage 2021-05-11 14:08:58 +02:00
xwayland-glx.c xwayland: Set the vendor name for GLX_EXT_libglvnd 2020-06-05 14:50:55 -04:00
xwayland-glx.h xwayland: Move Xwayland GLX declaration 2019-12-20 16:19:01 +01:00
xwayland-input.c xwayland: Fix LeaveNotify for relative pointer 2021-03-05 07:48:57 +01:00
xwayland-input.h xwayland: Delay cursor visibility update 2021-03-03 15:28:27 +01:00
xwayland-output.c xwayland: Replace need_rotate boolean with simple check on xdg-output 2020-09-01 13:13:57 +00:00
xwayland-output.h xwayland: Move Xwayland output declarations 2019-12-20 16:19:01 +01:00
xwayland-pixmap.c xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb 2020-07-07 13:47:11 +00:00
xwayland-pixmap.h xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb 2020-07-07 13:47:11 +00:00
xwayland-present.c xwayland: Check buffer prior to attaching it 2021-05-11 14:08:58 +02:00
xwayland-present.h xwayland: Rename present event lists 2020-07-22 11:01:42 +02:00
xwayland-screen.c xwayland: non-rootless requires the XDG-WM-Base protocol 2020-11-09 08:48:16 +00:00
xwayland-screen.h xwayland: Move dmabuf interface to common glamor code 2021-04-09 14:00:01 +00:00
xwayland-shm.c xwayland: Remove harmless duplicated #include 2020-07-20 00:19:22 +00:00
xwayland-shm.h xwayland: Move SHM declarations to their own header 2019-12-20 16:19:01 +01:00
xwayland-types.h xwayland: Move Xwayland structures to their own header 2019-12-20 16:19:01 +01:00
xwayland-vidmode.c xwayland: Initialise values in xwlVidModeGetGamma() 2020-07-03 10:56:43 +00:00
xwayland-vidmode.h xwayland: Move Xwayland vidmode declaration 2019-12-20 16:19:01 +01:00
xwayland-window-buffers.c xwayland: Hold window buffer until released 2020-12-10 13:49:42 +01:00
xwayland-window-buffers.h xwayland: Cleanup and remove xwayland.h 2019-12-20 16:19:01 +01:00
xwayland-window.c xwayland/glamor: Add return status to post_damage 2021-05-11 14:08:58 +02:00
xwayland-window.h xwayland: port rooted xwayland from wl_shell to xdg-shell protocol 2020-02-28 16:23:58 +00:00
xwayland.c xwayland: remove wl_log_set_handler_client workaround 2021-03-24 08:13:11 +01:00
xwayland.pc.in xwayland: Fix path in pkg-config with autoconf 2021-03-05 11:11:54 +01:00