From 81e5f9c398f4949130917fccebc13be44381976d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 12 Feb 2024 13:17:39 -0500 Subject: [PATCH] egl/wayland/sw: move swrast_update_buffers() directly into swapbuffers no functional changes Acked-by: Daniel Stone Part-of: --- src/egl/drivers/dri2/platform_wayland.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 065d0dd1252..900cbb3531c 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -2465,7 +2465,6 @@ dri2_wl_swrast_put_image2(__DRIdrawable *draw, int op, int x, int y, int w, assert(copy_width <= stride); - (void)swrast_update_buffers(dri2_surf); dst = dri2_wl_swrast_get_backbuffer_data(dri2_surf); /* partial copy, copy old content */ @@ -2513,6 +2512,9 @@ dri2_wl_swrast_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw, if (!dri2_surf->wl_win) return _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_swap_buffers"); + if (!disp->Options.Zink) + (void)swrast_update_buffers(dri2_surf); + if (n_rects) dri2_dpy->core->swapBuffersWithDamage(dri2_surf->dri_drawable, n_rects, rects); else