Snap wayland damage reports to the bounding box
This commit is contained in:
parent
b147e318f9
commit
75e761ff34
59
0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch
Normal file
59
0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From a655c446880613e17c3b91e66a7f7ac125f62228 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Jackson <ajax@redhat.com>
|
||||||
|
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 <ajax@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -42,7 +42,7 @@
|
|||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.14.3
|
Version: 1.14.3
|
||||||
Release: 4%{?gitdate:.%{gitdate}}%{dist}
|
Release: 5%{?gitdate:.%{gitdate}}%{dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -153,6 +153,7 @@ Patch9028: 0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch
|
|||||||
Patch9029: 0029-xwayland-Remove-unused-variables.patch
|
Patch9029: 0029-xwayland-Remove-unused-variables.patch
|
||||||
Patch9030: 0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.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
|
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 moduledir %{_libdir}/xorg/modules
|
||||||
%global drimoduledir %{_libdir}/dri
|
%global drimoduledir %{_libdir}/dri
|
||||||
@ -632,6 +633,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{xserver_source_dir}
|
%{xserver_source_dir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 08 2013 Adam Jackson <ajax@redhat.com> 1.14.3-5
|
||||||
|
- Snap wayland damage reports to the bounding box
|
||||||
|
|
||||||
* Thu Oct 03 2013 Adam Jackson <ajax@redhat.com> 1.14.3-4
|
* Thu Oct 03 2013 Adam Jackson <ajax@redhat.com> 1.14.3-4
|
||||||
- Fix up fixing up the driver list after filtering out non-wayland
|
- Fix up fixing up the driver list after filtering out non-wayland
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user