From 792359057bd54548555674d2d309c0cfeebac12d Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 11 Jun 2018 09:13:30 +0200 Subject: xwayland: simplify xwl_glamor_pixmap_get_wl_buffer() When retrieving the Wayland buffer from a pixmap, if the buffer already exists, the GBM backend will return that existing buffer. However, as seen with the Present issues, if the call had previously passed a wrong size, that buffer will remain at the wrong size for as long as the buffer exists, which is error prone. Considering that the width/height passed to get_wl_buffer() is always the actual pixmap drawable size, and considering that the EGLStream backend makes no use of the size either, there is really no point in passing the width/height around. Simplify the xwl_glamor_pixmap_get_wl_buffer() and EGL backends API by removing the pixmap size, and use the drawable size instead. Signed-off-by: Olivier Fourdan --- hw/xwayland/xwayland-glamor.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'hw/xwayland/xwayland-glamor.c') diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index 2f64d0500..61418e707 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -100,17 +100,13 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen, struct wl_buffer * xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap, - unsigned short width, - unsigned short height, Bool *created) { struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen); if (xwl_screen->egl_backend->get_wl_buffer_for_pixmap) return xwl_screen->egl_backend->get_wl_buffer_for_pixmap(pixmap, - width, - height, - created); + created); return NULL; } -- cgit v1.2.3