implement mirroring in a better way

Instead of awkwardly changing the scale and position of outputs to make their viewports overlap, this makes use of the split between logical and backend outputs and only creates one logical output for the two backend outputs. This has the benefit that window management code, effects and applications only see the one output, which removes a whole bunch of user visible problems.

To render a logical output on a display with potentially mismatching aspect ratio, this also adds infrastructure to have an offset (black bar) when compositing on a mirroring display. With the projection matrix and item renderer adjusted to handle that offset, effects only need very few changes.

draft because

  • this needs extensive testing, I'm certain there will be problems with screen rotation for example
  • I've only adjusted the blur and qtquick effects so far. I haven't seen issues with other effects yet, but I haven't done thorough testing either.
  • there's an odd line on the top and right of my panel (but only on the mirroring screen, not on the source!), that needs looking into
  • prepareRendering in compositor.cpp still has an ugly hack in it, need to think more about how to map the scene to the full primary plane
  • depends on !8364 (merged)

BUG: 481222

Edited by Xaver Hugl

Merge request reports

Loading