Replace window repaints with layer repaints
Windows have two kinds of repaints - window repaints and layer repaints. The main difference between the two is that the former is specified in the window-local coordinates while the latter is specified in the global screen coordinates. Window repaints are useful in case the position of the window doesn't matter, for example for repainting damaged regions, etc. But its biggest issue is that with per screen rendering, it's not possible to determine what screens exactly have to be repainted. The final area affected by the window repaint will be known only at compositing time. If a window gets damaged, we have to schedule a repaint on ALL outputs. Understandably, this costs a little bit in terms of performance. This change replaces the window repaints with the layer repaints. By doing so, we can avoid scheduling repaints on outputs that don't intersect with the dirty region and improve performance.
Showing with 7 additions and 21 deletions