From e02dbf650be54b6843758316d5596903d9b72459 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 3 May 2021 14:06:55 +0300 Subject: [PATCH] pixman-renderer: iterate paint nodes Iterate paint nodes instead of the global view list. Right now this does not change behavior. This is a step towards using per-output view lists that can then be optimized for the output in libweston core. Signed-off-by: Pekka Paalanen --- libweston/pixman-renderer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libweston/pixman-renderer.c b/libweston/pixman-renderer.c index 8cd650ca..bb37bcf1 100644 --- a/libweston/pixman-renderer.c +++ b/libweston/pixman-renderer.c @@ -517,11 +517,13 @@ static void repaint_surfaces(struct weston_output *output, pixman_region32_t *damage) { struct weston_compositor *compositor = output->compositor; - struct weston_view *view; + struct weston_paint_node *pnode; - wl_list_for_each_reverse(view, &compositor->view_list, link) - if (view->plane == &compositor->primary_plane) - draw_view(view, output, damage); + wl_list_for_each_reverse(pnode, &output->paint_node_z_order_list, + z_order_link) { + if (pnode->view->plane == &compositor->primary_plane) + draw_view(pnode->view, output, damage); + } } static void