Skip to content
  • Pekka Paalanen's avatar
    xwayland: reduce over-damage · f72587ec
    Pekka Paalanen authored and Adam Jackson's avatar Adam Jackson committed
    
    
    If an X11 app draws a little here, some there, and a tiny bit in the
    opposite corner, using RegionExtents for the damage to be sent to the
    Wayland compositor will cause massive over-damaging.
    
    However, we cannot blindly send an arbitrary number of damage
    rectangles, because there is a risk of overflowing the Wayland
    connection. If that happens, it triggers an abort in libwayland-client.
    
    Try to be more accurate with the damage by sending up to 256 rectangles
    per window, and fall back to extents otherwise. The number is completely
    arbitrary.
    
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
    f72587ec