From 73695995a77c823fd05f13300ed12fdee84cc8a1 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Mon, 22 Aug 2022 13:08:53 +0200 Subject: [PATCH] stage: Paint the untransformed swap region Painting the swap region with CLUTTER_DEBUG_PAINT_DAMAGE_REGION happens on the view framebuffer, so don't transform the region we paint to the onscreen. Fixes the swap region painting on rotated monitors. Part-of: --- src/backends/meta-stage-impl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/backends/meta-stage-impl.c b/src/backends/meta-stage-impl.c index b3f60645a..ca6f1f44f 100644 --- a/src/backends/meta-stage-impl.c +++ b/src/backends/meta-stage-impl.c @@ -633,17 +633,6 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl, COGL_TRACE_BEGIN_SCOPED (MetaStageImplRedrawViewSwapFramebuffer, "Paint (swap framebuffer)"); - if (clutter_stage_view_get_onscreen (stage_view) != - clutter_stage_view_get_framebuffer (stage_view)) - { - cairo_region_t *transformed_swap_region; - - transformed_swap_region = - transform_swap_region_to_onscreen (stage_view, swap_region); - cairo_region_destroy (swap_region); - swap_region = transformed_swap_region; - } - if (queued_redraw_clip) { cairo_region_t *swap_region_in_stage_space; @@ -663,6 +652,17 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl, cairo_region_destroy (swap_region_in_stage_space); } + if (clutter_stage_view_get_onscreen (stage_view) != + clutter_stage_view_get_framebuffer (stage_view)) + { + cairo_region_t *transformed_swap_region; + + transformed_swap_region = + transform_swap_region_to_onscreen (stage_view, swap_region); + cairo_region_destroy (swap_region); + swap_region = transformed_swap_region; + } + swap_framebuffer (stage_window, stage_view, swap_region,