Skip to content

window-group: Disable culling when rendering clone to offscreen buffer

When rendering to an offscreen buffer, we can not really where the result will end up on screen and if the rectangles used for culling will match up.

This was causing glitches when the gnome-shell magnifier was applying offscreen effects which caused the MetaWindowGroup to be rendered at an offset from the origin of the framebuffer, since ClutterOffscreenEffect draws to a slightly larger texture with a translated origin. This then later is cancelled out again when the effect is drawing its offscreen texture. To meta_actor_painting_untransformed() which only sees the transformation used when drawing to the buffer this however looked like the window group was being rendered at the offset. This then lead to redraw_clip getting translated accordingly, resulting in wrong coordinates for it being used for culling.

To fix this just avoid culling when rendering to an offscreen buffer.

Fixes: #1678 (closed)


I'm not entirely sure if there are maybe ways to get the correct coordinates, but I couldn't think of any.

Together with gnome-shell!2026 (merged) the performance impact of not doing culling in the fullscreen 1x magnifier case without effects is avoided. I'm not sure how common that is, the only use case I could come up with is having zoom enabled but at 1x most of the time to allow the zoom shortcuts to work.

This would also be 40 and 41 material.

Merge request reports