diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2007-06-15 21:55:05 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2007-06-15 21:55:05 +0000 |
commit | 7e61c2625ead560b176b26bb48f6a0adf4f3a854 (patch) | |
tree | ae98ddcfbcfd5628fec40ea4d89096cb89fdb626 /x11-libs | |
parent | upstream patches for bug #156367 and bug #181707, which should solve several ... (diff) | |
download | historical-7e61c2625ead560b176b26bb48f6a0adf4f3a854.tar.gz historical-7e61c2625ead560b176b26bb48f6a0adf4f3a854.tar.bz2 historical-7e61c2625ead560b176b26bb48f6a0adf4f3a854.zip |
upstream fix for bug #182058 and bug #182127
Package-Manager: portage-2.1.3_rc2
Diffstat (limited to 'x11-libs')
-rw-r--r-- | x11-libs/cairo/ChangeLog | 6 | ||||
-rw-r--r-- | x11-libs/cairo/cairo-1.4.8.ebuild | 3 | ||||
-rw-r--r-- | x11-libs/cairo/files/cairo-1.4.8-XError.patch | 75 |
3 files changed, 82 insertions, 2 deletions
diff --git a/x11-libs/cairo/ChangeLog b/x11-libs/cairo/ChangeLog index 81d7d51d330d..70ecb33c35c0 100644 --- a/x11-libs/cairo/ChangeLog +++ b/x11-libs/cairo/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-libs/cairo # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/ChangeLog,v 1.132 2007/06/15 20:46:48 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/ChangeLog,v 1.133 2007/06/15 21:55:05 cardoe Exp $ + + 15 Jun 2007; Doug Goldstein <cardoe@gentoo.org> + +files/cairo-1.4.8-XError.patch, cairo-1.4.8.ebuild: + upstream fix for bug #182058 and bug #182127 15 Jun 2007; Tobias Scherbaum <dertobi123@gentoo.org> cairo-1.4.6.ebuild: ppc stable, bug #176367 diff --git a/x11-libs/cairo/cairo-1.4.8.ebuild b/x11-libs/cairo/cairo-1.4.8.ebuild index 423b06862412..c72850998970 100644 --- a/x11-libs/cairo/cairo-1.4.8.ebuild +++ b/x11-libs/cairo/cairo-1.4.8.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-1.4.8.ebuild,v 1.3 2007/06/15 19:00:22 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-1.4.8.ebuild,v 1.4 2007/06/15 21:55:05 cardoe Exp $ inherit eutils flag-o-matic libtool @@ -45,6 +45,7 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}"/${P}-directfb.patch + epatch "${FILESDIR}"/${P}-XError.patch # We need to run elibtoolize to ensure correct so versioning on FreeBSD elibtoolize diff --git a/x11-libs/cairo/files/cairo-1.4.8-XError.patch b/x11-libs/cairo/files/cairo-1.4.8-XError.patch new file mode 100644 index 000000000000..6021ca25a48d --- /dev/null +++ b/x11-libs/cairo/files/cairo-1.4.8-XError.patch @@ -0,0 +1,75 @@ +From a51b7f58173d47b650d77b46c95f4afca138206f Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri, 15 Jun 2007 20:38:01 +0100 +Subject: [PATCH] [cairo-xlib-display] Hide XErrors during processing of the work queue. + +It is possible for the resource that we defer freeing are already +destroyed and trigger an XError whilst processing the work queue. For +example, the application renders to a Window and then destroys the +Drawable before proceeding with more rendering. This will trigger an +invalid Picture from RenderFreePicture whilst attempting to free the +resources. + +By ignoring the possibility that the application could allocate a fresh +resource with the same ID, we can simply hide the XErrors... +--- + src/cairo-xlib-display.c | 17 ++++++++++++++--- + 1 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c +index 5de9011..3ff633e 100644 +--- a/src/cairo-xlib-display.c ++++ b/src/cairo-xlib-display.c +@@ -405,10 +405,13 @@ void + _cairo_xlib_display_notify (cairo_xlib_display_t *display) + { + cairo_xlib_job_t *jobs, *job, *freelist; ++ Display *dpy = display->display; + + CAIRO_MUTEX_LOCK (display->mutex); + jobs = display->workqueue; + while (jobs != NULL) { ++ cairo_xlib_error_func_t old_handler; ++ + display->workqueue = NULL; + CAIRO_MUTEX_UNLOCK (display->mutex); + +@@ -422,24 +425,32 @@ _cairo_xlib_display_notify (cairo_xlib_display_t *display) + } while (jobs != NULL); + freelist = jobs = job; + ++ /* protect the notifies from triggering XErrors ++ * XXX There is a remote possibility that the application has ++ * been reallocated an XID that we are about to destroy here... */ ++ XSync (dpy, False); ++ old_handler = XSetErrorHandler (_noop_error_handler); ++ + do { + job = jobs; + jobs = job->next; + + switch (job->type){ + case WORK: +- job->func.work.notify (display->display, job->func.work.data); ++ job->func.work.notify (dpy, job->func.work.data); + if (job->func.work.destroy != NULL) + job->func.work.destroy (job->func.work.data); + break; + + case RESOURCE: +- job->func.resource.notify (display->display, +- job->func.resource.xid); ++ job->func.resource.notify (dpy, job->func.resource.xid); + break; + } + } while (jobs != NULL); + ++ XSync (dpy, False); ++ XSetErrorHandler (old_handler); ++ + CAIRO_MUTEX_LOCK (display->mutex); + do { + job = freelist; +-- +1.4.4.2 + |