Skip to content

wayland: Track repaints per each individual screen

Vlad Zahorodnii requested to merge work/per-screen-rendering-improvements into master

AnimationEffect schedules repaints in postPaintWindow() and performs cleanup in preScreenPaint(). With the X11-style rendering, this doesn't have any issues, scheduled repaints will be reset during the next compositing cycle.

But with per screen rendering, we might hit the following case

- Paint screen 0
- Reset scheduled repaints
- AnimationEffect::prePaintScreen(): update the timeline
- AnimationEffect::postPaintScreen(): schedule a repaint

- Paint screen 1
- Reset scheduled repaints
- AnimationEffect::prePaintScreen(): destroy the animation
- AnimationEffect::postPaintScreen(): no repaint is scheduled

- Return to the event loop

In this scenario, the repaint region scheduled by AnimationEffect will be lost when compositing is performed on screen 1.

There is no any other way to fix this issue but maintain repaint regions per each individual screen if per screen rendering is enabled.

BUG: 428439

Edited by Vlad Zahorodnii

Merge request reports