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
DE_UNREF(version);
if (!strcmp(interface, "wl_compositor"))
- _this->m_compositor = static_cast<struct wl_compositor*>(wl_registry_bind(registry, id, &wl_compositor_interface, 3));
+ _this->m_compositor = static_cast<struct wl_compositor*>(wl_registry_bind(registry, id, &wl_compositor_interface, version > 3 ? version : 3));
/* Todo: when the xdg_shell protocol has stablized, we should move wl_shell to xdg_shell. */
if (!strcmp(interface, "wl_shell"))
_this->m_shell = static_cast<struct wl_shell*>(wl_registry_bind(registry, id, &wl_shell_interface, 1));