[PATCH weston 2/2 v2] libweston: Allow compositor-wayland to use wl_surface_damage_buffer
Derek Foreman
derekf at osg.samsung.com
Fri May 19 15:53:18 UTC 2017
wl_surface_damage_buffer landed ages ago, but in order for GL to
use it the client must bind a wl_compositor version >= 4 (the
version where damage_buffer was introduced).
This patch updates the bind version and allows
eglSwapBuffersWithDamage to actually use the provided damage
rectangles instead of performing full surface damage.
Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
libweston/compositor-wayland.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
index 14f2c8db..77a73689 100644
--- a/libweston/compositor-wayland.c
+++ b/libweston/compositor-wayland.c
@@ -2319,7 +2319,8 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
if (strcmp(interface, "wl_compositor") == 0) {
b->parent.compositor =
wl_registry_bind(registry, name,
- &wl_compositor_interface, 1);
+ &wl_compositor_interface,
+ MIN(version, 4));
} else if (strcmp(interface, "zxdg_shell_v6") == 0) {
b->parent.xdg_shell =
wl_registry_bind(registry, name,
--
2.11.0
More information about the wayland-devel
mailing list