[xorg-x11-drv-qxl/f16] Bug 731245 again

Soren Sandmann Pedersen ssp at fedoraproject.org
Fri Oct 28 17:09:23 UTC 2011


commit 5d4e5718fd3bc23babf08bb1e095c8af581fca97
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Fri Oct 28 13:03:59 2011 -0400

    Bug 731245 again

 ...he-access-region-according-to-the-drawabl.patch |   53 ++++++++++++++++++++
 surface-bound-fix.patch                            |   35 -------------
 xorg-x11-drv-qxl.spec                              |    6 ++-
 3 files changed, 58 insertions(+), 36 deletions(-)
---
diff --git a/0010-Translate-the-access-region-according-to-the-drawabl.patch b/0010-Translate-the-access-region-according-to-the-drawabl.patch
new file mode 100644
index 0000000..d628884
--- /dev/null
+++ b/0010-Translate-the-access-region-according-to-the-drawabl.patch
@@ -0,0 +1,53 @@
+From c77ba9f217093f946a4c6bf6edf9f34b24844d8d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B8ren=20Sandmann?= <ssp at redhat.com>
+Date: Fri, 28 Oct 2011 12:56:30 -0400
+Subject: [PATCH] Translate the access region according to the drawable offset.
+
+The driver code expects to be given coordinates relative to the
+offscreen pixmap.
+---
+ src/uxa/uxa.c |   13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/uxa/uxa.c b/src/uxa/uxa.c
+index 83e06cc..9d02e34 100644
+--- a/src/uxa/uxa.c
++++ b/src/uxa/uxa.c
+@@ -143,19 +143,19 @@ Bool uxa_prepare_access(DrawablePtr pDrawable, RegionPtr region, uxa_access_t ac
+ {
+ 	ScreenPtr pScreen = pDrawable->pScreen;
+ 	uxa_screen_t *uxa_screen = uxa_get_screen(pScreen);
+-	PixmapPtr pPixmap = uxa_get_drawable_pixmap(pDrawable);
+-	Bool offscreen = uxa_pixmap_is_offscreen(pPixmap);
++	int xoff, yoff;
++	PixmapPtr pPixmap = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff);
+ 	BoxRec box;
+ 	RegionRec region_rec;
+ 	Bool result;
+ 
+-	if (!offscreen)
++	if (!pPixmap)
+ 	    return TRUE;
+ 
+ 	box.x1 = 0;
+ 	box.y1 = 0;
+-	box.x2 = pPixmap->drawable.width;
+-	box.y2 = pPixmap->drawable.height;
++	box.x2 = pDrawable->width;
++	box.y2 = pDrawable->height;
+ 	
+ 	REGION_INIT (pScreen, &region_rec, &box, 1);
+ 	if (!region)
+@@ -168,7 +168,8 @@ Bool uxa_prepare_access(DrawablePtr pDrawable, RegionPtr region, uxa_access_t ac
+ 	 */
+ 	REGION_INTERSECT (pScreen, region, region, &region_rec);
+ #endif
+-	
++	REGION_TRANSLATE (pScreen, region, xoff, yoff);
++
+ 	result = TRUE;
+ 
+ 	if (uxa_screen->info->prepare_access)
+-- 
+1.7.4
+
diff --git a/xorg-x11-drv-qxl.spec b/xorg-x11-drv-qxl.spec
index b1ef35f..1b6eee9 100644
--- a/xorg-x11-drv-qxl.spec
+++ b/xorg-x11-drv-qxl.spec
@@ -23,7 +23,7 @@ Patch7:    0007-rename-xspice-Xspice.patch
 # Support for old revision 1 qxl device (which won't go upstream)
 Patch8:    0008-Add-old-driver-in-as-a-compatibility-layer.patch
 Patch9:    0009-Link-in-the-compat-driver-various-renamings.patch
-Patch10:   surface-bound-fix.patch
+Patch10:   0010-Translate-the-access-region-according-to-the-drawabl.patch
 License:   MIT
 Group:     User Interface/X Hardware Support
 
@@ -117,6 +117,10 @@ rm $RPM_BUILD_ROOT/usr/share/doc/xf86-video-qxl/spiceqxl.xorg.conf.example
 
 
 %changelog
+* Wed Oct 28 2011 Soren Sandmann <ssp at redhat.com> - 0.0.21-7
+- Add patch to translate access regions according to drawable offset
+  Bug 731245.
+
 * Thu Oct 27 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.21-7
 - Rebuilt for glibc bug#747377
 


More information about the scm-commits mailing list