[RFC xserver 1/1] xwayland: reduce over-damage

Adam Jackson ajax at nwnk.net
Mon Jan 22 18:14:10 UTC 2018


On Mon, 2018-01-22 at 14:51 +0000, Daniel Stone wrote:
>  Hi Pekka,
> 
> On 20 December 2017 at 11:18, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > 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 500 rectangles
> > per window, and fall back to extents otherwise. The number is completely
> > arbitrary.
> 
> I might have said this on IRC, but 500 sails close enough to our
> request limit for comfort. I can't find the mail where I did the
> maths, but ISTR for damage requests, it's around the 6000-7000 mark.
> Pulling 256 as an equally arbitrary number out of the air (arguably
> even that number of TexSubImage requests represents a DoS), this is:
> Reviewed-by: Daniel Stone <daniels at collabora.com>

Changed the magic number to 256 and merged, thanks:

remote: E: failed to find patch for rev f72587ecc7e1dedfb20a999a0e600b83c06a1b29.
remote: I: 0 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   a5e9bcad7..f72587ecc  master -> master

- ajax


More information about the xorg-devel mailing list