OSDN Git Service

wayland/egl: Ensure EGL surface is resized on DRI update_buffers()
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 20 Nov 2018 17:06:38 +0000 (18:06 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 6 Mar 2019 11:48:01 +0000 (11:48 +0000)
commit036b326e02261d316250cbf7587299b49245e8c2
tree2b732eac7796cad2dc4f4bb8f81577a89a959b8c
parent9b483d945b50a8ca037bbbf43b37781845a92943
wayland/egl: Ensure EGL surface is resized on DRI update_buffers()

Fullscreening and unfullscreening a totem window while playing a video
sometimes results in the video subsurface not changing size along. This
is also reproducible with epiphany.

If a surface gets resized while we have an active back buffer for it, the
resized dimensions won't get neither immediately applied on the resize
callback, nor correctly synchronized on update_buffers(), as the
(now stale) surface size and currently attached buffer size still do match.

There's actually 2 things to synchronize here, first the surface query
size might not be updated yet to the wl_egl_window's (i.e. resize_callback
happened while there is a back buffer), and second the wayland buffers
would need dropping if new surface size differs with the currently attached
buffer. These are done in separate steps now.

https://bugzilla.redhat.com/show_bug.cgi?id=1650929
https://bugs.freedesktop.org/show_bug.cgi?id=109594

Fixes: a9fb331ea7d ("wayland/egl: update surface size on window resize")
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Denys Kostin <denys.kostin@globallogic.com>
(cherry picked from commit 30a01cd9232ed83a0259d184b82e050bae219ed3)
src/egl/drivers/dri2/platform_wayland.c