[PATCH xwayland] xwayland: Just send the bounding box of the damage

Kristian Høgsberg krh at bitplanet.net
Thu Oct 31 21:09:24 CET 2013


On Wed, Oct 30, 2013 at 4:14 PM, Daniel Stone <daniel at fooishbar.org> wrote:
> Hi,
>
> On 30 October 2013 21:31, Adam Jackson <ajax at redhat.com> wrote:
>> ... instead of every rect.  Most window updates are going to be CopyArea
>> in from offscreen, with plenty of time to get back around to
>> BlockHandler in between, so this is no change there.  However for
>> pathological apps like x11perf that draw complicated primitives directly
>> to the window you can end up with massive numbers of damage rects, and
>> you can run out of space in the write buffer and crash.
>>
>> This obviously isn't a complete fix, and it would be nice to handle this
>> more gracefully in the wayland client code, but this at least lets
>> x11perf -all run to completion.
>>
>> While we're in the area, rearrange attach to be before damage, not
>> after, since the spec says that's the correct order.
>>
>> Signed-off-by: Adam Jackson <ajax at redhat.com>
>
> Given the CopyArea-from-pixmap thing as the dominant usecase:
> Reviewed-by: Daniel Stone <daniel at fooishbar.org>

Yeah, I think it's fine.  You could do a hybrid version where we send
the damage regions if count < 10 or so, and fall back to bounding rect
otherwise.  That would let us catch common cases such as L shaped
regions, while still not going all pathological on x11perf.  But in
practice I doubt it will make much of a difference, and simpler is
better.

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> Cheers,
> Daniel
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list