stage-impl: Blit damage regions of all ages when using a shadow FB

Original idea by Gert van de Kraats, modified to avoid having an
unused intermediate swap_region.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2602
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3117>
This commit is contained in:
Daniel van Vugt 2023-07-12 18:42:47 +08:00 committed by Marge Bot
parent 828bc023d0
commit 626498348b

View File

@ -600,10 +600,12 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
* artefacts. * artefacts.
*/ */
/* swap_region does not need damage history, set it up before that */ /* swap_region does not need damage history, set it up before that */
if (use_clipped_redraw) if (!use_clipped_redraw)
swap_region = cairo_region_copy (fb_clip_region);
else
swap_region = cairo_region_create (); swap_region = cairo_region_create ();
else if (clutter_stage_view_has_shadowfb (stage_view))
swap_region = cairo_region_reference (fb_clip_region);
else
swap_region = cairo_region_copy (fb_clip_region);
swap_with_damage = FALSE; swap_with_damage = FALSE;
if (has_buffer_age) if (has_buffer_age)