diff --git a/0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch b/0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch new file mode 100644 index 0000000..f15706a --- /dev/null +++ b/0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch @@ -0,0 +1,59 @@ +From a655c446880613e17c3b91e66a7f7ac125f62228 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 8 Oct 2013 13:54:27 -0400 +Subject: [PATCH] xwayland: Just send the bounding box of the damage + +... 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 +--- + hw/xfree86/xwayland/xwayland.c | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c +index c70a52d..c10a213 100644 +--- a/hw/xfree86/xwayland/xwayland.c ++++ b/hw/xfree86/xwayland/xwayland.c +@@ -333,22 +333,18 @@ void xwl_screen_post_damage(struct xwl_screen *xwl_screen) + struct xwl_window *xwl_window; + RegionPtr region; + BoxPtr box; +- int count, i; + + xorg_list_for_each_entry(xwl_window, &xwl_screen->damage_window_list, + link_damage) { + region = DamageRegion(xwl_window->damage); +- count = RegionNumRects(region); +- for (i = 0; i < count; i++) { +- box = &RegionRects(region)[i]; +- wl_surface_damage(xwl_window->surface, +- box->x1, box->y1, +- box->x2 - box->x1, +- box->y2 - box->y1); +- } + wl_surface_attach(xwl_window->surface, + xwl_window->buffer, + 0, 0); ++ box = ®ion->extents; ++ wl_surface_damage(xwl_window->surface, ++ box->x1, box->y1, ++ box->x2 - box->x1, ++ box->y2 - box->y1); + wl_surface_commit(xwl_window->surface); + DamageEmpty(xwl_window->damage); + } +-- +1.8.3.1 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index fba2e2a..5a25681 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.14.3 -Release: 4%{?gitdate:.%{gitdate}}%{dist} +Release: 5%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -153,6 +153,7 @@ Patch9028: 0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch Patch9029: 0029-xwayland-Remove-unused-variables.patch Patch9030: 0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch Patch9031: 0001-xfree86-Only-look-at-wayland-capable-drivers-when-wa.patch +Patch9032: 0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri @@ -632,6 +633,9 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Tue Oct 08 2013 Adam Jackson 1.14.3-5 +- Snap wayland damage reports to the bounding box + * Thu Oct 03 2013 Adam Jackson 1.14.3-4 - Fix up fixing up the driver list after filtering out non-wayland