summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-01 16:38:03 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-01 16:38:03 -0500
commit1cd5b2db38e3bbc4a3184b2c199f3745c3a40698 (patch)
treee3c8de37bb43568812aef562090e7f2d5f061b4a /extra
parent7345649cbc9f7d36bc9ad8edab017461efd95051 (diff)
parent311d0420d77867bdb1066d38743e68e596a17ce5 (diff)
Merge branch 'master' of vparabola:~/abslibre-pre-mips64el
Conflicts: community/python-sympy/PKGBUILD
Diffstat (limited to 'extra')
-rw-r--r--extra/xorg-server/glx-pixmap-crash.patch85
1 files changed, 0 insertions, 85 deletions
diff --git a/extra/xorg-server/glx-pixmap-crash.patch b/extra/xorg-server/glx-pixmap-crash.patch
deleted file mode 100644
index 48f258eb5..000000000
--- a/extra/xorg-server/glx-pixmap-crash.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 390ba6686d1baf80627c01d4a4273981d6606cc9 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Mon, 28 Mar 2011 16:30:09 +0000
-Subject: glx: Fix lifetime tracking for pixmaps
-
-GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
-IDs can be destroyed in either order with no error. Only windows need
-to be tracked under both XIDs.
-
-Fixes piglit/glx-pixmap-life.
-
-Reviewed-by: Michel Dänzer <michel@daenzer.net>
-Signed-off-by: Adam Jackson <ajax@redhat.com>
----
-diff --git a/glx/glxcmds.c b/glx/glxcmds.c
-index 66d4c7e..d5b764f 100644
---- a/glx/glxcmds.c
-+++ b/glx/glxcmds.c
-@@ -1127,10 +1127,11 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen,
- return BadAlloc;
- }
-
-- /* Add the glx drawable under the XID of the underlying X drawable
-- * too. That way we'll get a callback in DrawableGone and can
-- * clean up properly when the drawable is destroyed. */
-- if (drawableId != glxDrawableId &&
-+ /*
-+ * Windows aren't refcounted, so track both the X and the GLX window
-+ * so we get called regardless of destruction order.
-+ */
-+ if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW &&
- !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
- pGlxDraw->destroy (pGlxDraw);
- return BadAlloc;
-@@ -1161,6 +1162,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config
- err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
- glxDrawableId, GLX_DRAWABLE_PIXMAP);
-
-+ ((PixmapPtr)pDraw)->refcnt++;
-+
- return err;
- }
-
-diff --git a/glx/glxext.c b/glx/glxext.c
-index 3f3dd79..9cfc096 100644
---- a/glx/glxext.c
-+++ b/glx/glxext.c
-@@ -118,15 +118,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
- {
- __GLXcontext *c, *next;
-
-- /* If this drawable was created using glx 1.3 drawable
-- * constructors, we added it as a glx drawable resource under both
-- * its glx drawable ID and it X drawable ID. Remove the other
-- * resource now so we don't a callback for freed memory. */
-- if (glxPriv->drawId != glxPriv->pDraw->id) {
-- if (xid == glxPriv->drawId)
-- FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
-- else
-- FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
-+ if (glxPriv->type == GLX_DRAWABLE_WINDOW) {
-+ /* If this was created by glXCreateWindow, free the matching resource */
-+ if (glxPriv->drawId != glxPriv->pDraw->id) {
-+ if (xid == glxPriv->drawId)
-+ FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
-+ else
-+ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
-+ }
-+ /* otherwise this window was implicitly created by MakeCurrent */
- }
-
- for (c = glxAllContexts; c; c = next) {
-@@ -143,6 +143,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
- c->readPriv = NULL;
- }
-
-+ /* drop our reference to any backing pixmap */
-+ if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
-+ glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw);
-+
- glxPriv->destroy(glxPriv);
-
- return True;
---
-cgit v0.8.3-6-g21f6