From 3db7d4164267271b223534137d65d9c5954f49c1 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 3 Jul 2025 14:44:06 -0500 Subject: [PATCH] compositor: Don't check for cached data in synchronized_commit It really doesn't matter if we do a little extra work here, weston_subsurface_commit_from_cache() is harmless if called on clean state. If this turns out to waste some cycles we can add some more dirty bits later. Signed-off-by: Derek Foreman --- libweston/compositor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index d2daacd5a..a68247dee 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -5474,7 +5474,7 @@ static enum weston_surface_status weston_subsurface_synchronized_commit(struct weston_subsurface *sub) { struct weston_surface *surface = sub->surface; - enum weston_surface_status status = WESTON_SURFACE_CLEAN; + enum weston_surface_status status; struct weston_subsurface *tmp; /* From now on, commit_from_cache the whole sub-tree, regardless of @@ -5483,8 +5483,7 @@ weston_subsurface_synchronized_commit(struct weston_subsurface *sub) * all the way down. */ - if (sub->has_cached_data) - status |= weston_subsurface_commit_from_cache(sub); + status = weston_subsurface_commit_from_cache(sub); wl_list_for_each(tmp, &surface->subsurface_list, parent_link) { if (tmp->surface != surface)