Skip to content

Translation and leak fixes for gl-renderer's y-invert helper

The new gl-renderer y_invert helper from !106 (merged) faithfully documented the correct behaviour to translate from global to per-output co-ordinate space. Unfortunately it just moved the code from the swap_buffers_with_damage call, which did the wrong thing: it failed to account for outputs being offset in the global co-ordinate space, but each having their own buffers with a top-left origin. This MR makes the code match the comment, by adding a translation before we apply output scaling.

Not documented by the comment, the helper also leaked a Pixman region. Make sure we free what we allocate.

/cc @bbrezillon @zubzub

Merge request reports