waylandsink: Ensure correct mapping of area_surface
authorRobert Mader <robert.mader@collabora.com>
Thu, 30 Dec 2021 15:52:17 +0000 (16:52 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 17 Jan 2022 13:17:57 +0000 (13:17 +0000)
commite7c9960783dfac5530419b5e38ff8ba4971c345b
tree1ba99aac14d20dfc4719ce62d75c5f8f01318df5
parent6ea56e7fd39c48e718a10b6e69ec214532789a59
waylandsink: Ensure correct mapping of area_surface

If the `area_surface` got unmapped when changing to the `READY` or
`NULL` state, we currently don't remap it when playback resumes and
`wp_viewporter` is supported. Without `wp_viewporter` we do remap
it, but rather unintentionally and also when not wanted.

On Weston this has not been a big problem as it so far wrongly maps
subsurfaces of unmapped surfaces anyway - i.e. only the black
background was missing on resume. On other compositors and future
Weston this prevents the `video_surface` to get remapped.

Shuffle things around to ensure `area_surface` is mapped in the
right situations and do some minor cleanup.

See also https://gitlab.freedesktop.org/wayland/weston/-/issues/426

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1483>
subprojects/gst-plugins-bad/ext/wayland/wlwindow.c
subprojects/gst-plugins-bad/ext/wayland/wlwindow.h