[xorg-x11-server] Snap xwayland damage reports to the bounding box
Adam Jackson
ajax at fedoraproject.org
Wed Jul 2 16:40:21 UTC 2014
commit b3868e8f8b0d405f50f9d472857cdca8f35e7d1d
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jul 2 12:40:22 2014 -0400
Snap xwayland damage reports to the bounding box
...d-Snap-damage-reports-to-the-bounding-box.patch | 58 ++++++++++++++++++++
xorg-x11-server.spec | 8 +++-
2 files changed, 65 insertions(+), 1 deletions(-)
---
diff --git a/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch b/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
new file mode 100644
index 0000000..df982d4
--- /dev/null
+++ b/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
@@ -0,0 +1,58 @@
+From a1cfc5c7a2265d7bb1228d5344dab0c916ec2d26 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Tue, 1 Jul 2014 10:28:13 -0400
+Subject: [PATCH] xwayland: Snap damage reports to the bounding box
+
+Instead of sending every little rect. Lets x11perf run to completion,
+makes 'while true; do gtkperf -a; done' take longer to crash.
+
+This is effectively a resend of the same logic against the old
+xfree86+xwayland branch:
+
+http://lists.x.org/archives/xorg-devel/2013-October/038453.html
+
+Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+---
+ hw/xwayland/xwayland.c | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
+index b966e50..a4aeecd 100644
+--- a/hw/xwayland/xwayland.c
++++ b/hw/xwayland/xwayland.c
+@@ -326,25 +326,21 @@ xwl_screen_post_damage(struct xwl_screen *xwl_screen)
+ struct xwl_window *xwl_window;
+ RegionPtr region;
+ BoxPtr box;
+- int count, i;
+ struct wl_buffer *buffer;
+ PixmapPtr pixmap;
+
+ xorg_list_for_each_entry(xwl_window, &xwl_screen->damage_window_list,
+ link_damage) {
+ region = DamageRegion(xwl_window->damage);
+- count = RegionNumRects(region);
+-
+ pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
+
+ buffer = xwl_shm_pixmap_get_wl_buffer(pixmap);
+ wl_surface_attach(xwl_window->surface, buffer, 0, 0);
+- 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);
+- }
++
++ box = RegionExtents(region);
++ 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);
+ }
+--
+2.0.0
+
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index cf2530b..8011f45 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.15.99.903
-Release: 3%{?gitdate:.%{gitdate}}%{dist}
+Release: 4%{?gitdate:.%{gitdate}}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -104,6 +104,9 @@ Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
Patch10100: platform-support-non-pci-platform-devices.patch
Patch10101: add-SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS.patch
+# submitted http://lists.x.org/archives/xorg-devel/2014-July/042936.html
+Patch10200: 0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
+
%global moduledir %{_libdir}/xorg/modules
%global drimoduledir %{_libdir}/dri
%global sdkdir %{_includedir}/xorg
@@ -618,6 +621,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
%changelog
+* Wed Jul 02 2014 Adam Jackson <ajax at redhat.com> 1.15.99.903-4
+- Snap xwayland damage reports to the bounding box
+
* Wed Jul 2 2014 Hans de Goede <hdegoede at redhat.com> - 1.15.99.903-3
- Fix xvfb crash on client disconnect (rhbz#1113128)
More information about the scm-commits
mailing list