From 8ca5d733559c1a8eb5ffdeae95360d6302b8bf0f Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 25 Aug 2020 17:44:35 +0100 Subject: [PATCH] drm/state-propose: Reduce variable scope Reduce the scope of surface_overlap to where it's actually used, which is only in the per-view loop, where it gets initialised and destroyed every time. Signed-off-by: Daniel Stone --- libweston/backend-drm/state-propose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index cc4672bf..78116896 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -769,7 +769,7 @@ drm_output_propose_state(struct weston_output *output_base, struct drm_plane_state *scanout_state = NULL; struct weston_view *ev; - pixman_region32_t surface_overlap, renderer_region; + pixman_region32_t renderer_region; pixman_region32_t occluded_region; bool renderer_ok = (mode != DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY); @@ -844,6 +844,7 @@ drm_output_propose_state(struct weston_output *output_base, struct drm_plane_state *ps = NULL; bool force_renderer = false; pixman_region32_t clipped_view; + pixman_region32_t surface_overlap; bool totally_occluded = false; drm_debug(b, "\t\t\t[view] evaluating view %p for "