Improve Wayland protocol version selection.
authorTomek Bury <tomek.bury@broadcom.com>
Tue, 3 Mar 2020 14:41:50 +0000 (14:41 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 28 May 2020 07:35:35 +0000 (03:35 -0400)
commit4a5ac158f60a3698f064779a839af05d90b4cdd3
tree03c72bbe84bc63dc0dfd0a72e7cb3eb8344e5c42
parent64d344b60bb7b4324525e08766fdeb14bf1f18c6
Improve Wayland protocol version selection.

VK-GL-CTS issue: 2252

Requesting specifically version 3 of the protocol makes the
wl_surface_damage_buffer() API unavailable to the client, even if
the compositor supports it. This may effectively disable
the EGL_EXT_swap_buffers_with_damage extension in the EGL implementation.

The wl_compositor protocol version 4 was released in Wayland 1.10
in february 2016. It contains a new define:

#define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4

and a new API:

wl_surface_damage_buffer(struct wl_surface *wl_surface,
    int32_t x, int32_t y, int32_t width, int32_t height);

Requesting "at least version 3" is still backwards compatible with older
compositors, but doesn't block the newer ones from providing version 4
with the wl_surface_damage_buffer() API. This API can be used by EGL
to implement the EGL_EXT_swap_buffers_with_damage extension.

Affects:
    dEQP-EGL.functional.swap_buffers_with_damage.*

Change-Id: I621524328a90b2d629baad8c96d3a18e1eb2cf76
framework/platform/lnx/wayland/tcuLnxWayland.cpp