moved extended damage to the top of output_render

This commit is contained in:
William McKinnon 2023-05-14 18:21:15 -04:00
parent 13d368544d
commit 690f5c37ff

View file

@ -1763,6 +1763,13 @@ void output_render(struct sway_output *output, struct timespec *when,
return; return;
} }
/* we need to track extended damage for blur (as it is expanded in output.c),
before we expand it again later in this function
*/
pixman_region32_t extended_damage;
pixman_region32_init(&extended_damage);
pixman_region32_copy(&extended_damage, damage);
struct sway_container *fullscreen_con = root->fullscreen_global; struct sway_container *fullscreen_con = root->fullscreen_global;
if (!fullscreen_con) { if (!fullscreen_con) {
fullscreen_con = workspace->current.fullscreen; fullscreen_con = workspace->current.fullscreen;
@ -1828,9 +1835,6 @@ void output_render(struct sway_output *output, struct timespec *when,
goto renderer_end; goto renderer_end;
} }
pixman_region32_t extended_damage;
pixman_region32_init(&extended_damage);
if (output_has_opaque_overlay_layer_surface(output)) { if (output_has_opaque_overlay_layer_surface(output)) {
goto render_overlay; goto render_overlay;
} }
@ -1869,8 +1873,6 @@ void output_render(struct sway_output *output, struct timespec *when,
render_unmanaged(output, damage, &root->xwayland_unmanaged); render_unmanaged(output, damage, &root->xwayland_unmanaged);
#endif #endif
} else { } else {
pixman_region32_copy(&extended_damage, damage);
bool should_render_blur = should_workspace_have_blur(workspace); bool should_render_blur = should_workspace_have_blur(workspace);
if (should_render_blur) { if (should_render_blur) {
wlr_region_expand(damage, damage, config_get_blur_size()); wlr_region_expand(damage, damage, config_get_blur_size());