xserver: Branch 'master' - 22 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 12 19:45:48 UTC 2025
Xext/saver.c | 7 +----
Xext/shm.c | 8 +++---
composite/compalloc.c | 2 -
composite/compwindow.c | 8 ++----
dbe/midbe.c | 28 ++++++++---------------
dix/dispatch.c | 2 -
dix/gc.c | 20 +++++++---------
dix/glyphcurs.c | 5 +---
dix/pixmap.c | 7 ++---
dix/window.c | 18 +++++++-------
doc/Xserver-spec.xml | 8 ++++++
dri3/dri3_request.c | 4 +--
exa/exa_classic.c | 21 +++++++++--------
exa/exa_driver.c | 14 ++++++-----
exa/exa_glyphs.c | 8 +++---
exa/exa_mixed.c | 7 ++++-
exa/exa_offscreen.c | 2 -
exa/exa_render.c | 4 +--
fb/fboverlay.c | 2 -
glamor/glamor_composite_glyphs.c | 5 +---
glamor/glamor_egl.c | 8 +++---
glx/glxcmds.c | 2 -
hw/kdrive/ephyr/hostx.c | 2 -
hw/vfb/InitOutput.c | 3 --
hw/xfree86/common/xf86DGA.c | 4 +--
hw/xfree86/dri2/dri2.c | 14 +++++------
hw/xfree86/drivers/modesetting/dri2.c | 7 ++---
hw/xfree86/drivers/modesetting/drmmode_display.c | 9 ++-----
hw/xnest/GC.c | 2 -
hw/xwayland/xwayland-output.c | 2 -
hw/xwayland/xwayland-window-buffers.c | 6 +---
hw/xwayland/xwayland-window.c | 2 -
include/dix.h | 16 +++++++++++--
mi/miarc.c | 2 -
mi/midispcur.c | 21 +++++++----------
mi/migc.c | 2 -
mi/miglblt.c | 6 ++--
mi/miscrinit.c | 3 +-
miext/shadow/shadow.c | 3 --
randr/rrcrtc.c | 8 +++---
render/glyph.c | 4 +--
render/mipict.c | 2 -
render/picture.c | 2 -
render/render.c | 4 +--
44 files changed, 156 insertions(+), 158 deletions(-)
New commits:
commit b61647f3a10d0b12004b28ef98525614c869e61a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Oct 4 12:51:11 2024 +0200
dix: add in-code docs for dixDestroyPixmap()
Give some more explaination for the dixDestroyPixmap() function.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/include/dix.h b/include/dix.h
index 33db66b05..49d50e603 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -148,8 +148,20 @@ extern _X_EXPORT void UpdateCurrentTime(void);
extern _X_EXPORT void UpdateCurrentTimeIf(void);
-extern _X_EXPORT int dixDestroyPixmap(void *value,
- XID pid);
+/*
+ * @brief dereference a pixmap and destroy it when not used anymore
+ *
+ * Despite the name, this function unref's the pixmap, and only destroys it when
+ * the pixmap isn't used anymore. (perhaps it should be renamed to dixUnrefPixmap())
+ *
+ * Note: it's also used as resource destructor callback, hence that strange args.
+ * (not actually finest art, but for now a good compromise, since it's already
+ * existing and exported, thus can easily be used by drivers, w/o breaking compat)
+ *
+ * @param pPixmap pointer to pixmap (PixmapPtr) that should be unref'ed
+ * @param unused ignored, only for matching the resource destructor prototype
+ */
+_X_EXPORT int dixDestroyPixmap(void *pPixmap, XID unused);
extern _X_EXPORT ClientPtr NextAvailableClient(void *ospriv);
commit ee798cf212388c2a97cbf2f2e60adab370047c71
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Oct 2 22:20:22 2024 +0200
exa: simplify CreatePixmap()/DestroyPixmap() handlers error pathes
Instead of complex wrap/unwrap trickery in the error path, just
protect the DestroyPixmap() handlers from half-initialized state.
Prior to this change, we always had to make sure, the we're calling
the original (screen driver's) handler directly, instead of our own
(which calls the original one, too), so it doesn't do any damage.
This isn't necessary anymore, since it finds out on it own what to do.
This not just makes the code flow simpler and easier to understand, but
also clears the road for decoupling the extension specific pixmap destructor
logic from the ScreenRec proc vectors (*1).
*1) see: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1755
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index 7f93f1e3d..05f0ff2a8 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -96,10 +96,9 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
pExaPixmap->fb_size = pExaPixmap->fb_pitch * h;
if (pExaPixmap->fb_pitch > 131071) {
- swap(pExaScr, pScreen, DestroyPixmap);
- if (pScreen->DestroyPixmap)
- pScreen->DestroyPixmap(pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
+ // don't need to protect from calling our own (wrapped) DestroyPixmap
+ // handler, because it can deal with half-initialized state
+ dixDestroyPixmap(pPixmap, 0);
return NULL;
}
@@ -109,10 +108,9 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
pScreen, pPixmap);
if (pExaPixmap->pDamage == NULL) {
- swap(pExaScr, pScreen, DestroyPixmap);
- if (pScreen->DestroyPixmap)
- pScreen->DestroyPixmap(pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
+ // don't need to protect from calling our own (wrapped) DestroyPixmap
+ // handler, because it can deal with half-initialized state
+ dixDestroyPixmap(pPixmap, 0);
return NULL;
}
@@ -218,6 +216,8 @@ exaDestroyPixmap_classic(PixmapPtr pPixmap)
if (pPixmap->refcnt == 1) {
ExaPixmapPriv(pPixmap);
+ if (!pExaPixmap) // we're called on an error path
+ goto out;
exaDestroyPixmap(pPixmap);
@@ -235,9 +235,10 @@ exaDestroyPixmap_classic(PixmapPtr pPixmap)
RegionUninit(&pExaPixmap->validFB);
}
+out:
+ // restore original (screen driver's) DestroyPixmap() handler and call it
swap(pExaScr, pScreen, DestroyPixmap);
- if (pScreen->DestroyPixmap)
- ret = pScreen->DestroyPixmap(pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
swap(pExaScr, pScreen, DestroyPixmap);
return ret;
diff --git a/exa/exa_driver.c b/exa/exa_driver.c
index 17106fcb9..e56f980c7 100644
--- a/exa/exa_driver.c
+++ b/exa/exa_driver.c
@@ -98,10 +98,9 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
}
if (!pExaPixmap->driverPriv) {
- swap(pExaScr, pScreen, DestroyPixmap);
- if (pScreen->DestroyPixmap)
- pScreen->DestroyPixmap(pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
+ // don't need to protect from calling our own (wrapped) DestroyPixmap
+ // handler, because it can deal with half-initialized state
+ dixDestroyPixmap(pPixmap, 0);
return NULL;
}
@@ -196,6 +195,8 @@ exaDestroyPixmap_driver(PixmapPtr pPixmap)
if (pPixmap->refcnt == 1) {
ExaPixmapPriv(pPixmap);
+ if (!pExaPixmap) // we're called on an error path
+ goto out;
exaDestroyPixmap(pPixmap);
@@ -204,9 +205,10 @@ exaDestroyPixmap_driver(PixmapPtr pPixmap)
pExaPixmap->driverPriv = NULL;
}
+out:
+ // restore original (screen driver's) DestroyPixmap() handler and call it
swap(pExaScr, pScreen, DestroyPixmap);
- if (pScreen->DestroyPixmap)
- ret = pScreen->DestroyPixmap(pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
swap(pExaScr, pScreen, DestroyPixmap);
return ret;
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index 7138f9b30..340c45a1f 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -249,6 +249,8 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
if (pPixmap->refcnt == 1) {
ExaPixmapPriv(pPixmap);
+ if (!pExaPixmap)
+ goto out; // we're called on an error path
exaDestroyPixmap(pPixmap);
@@ -266,9 +268,10 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
}
}
+out:
+ // restore original (screen driver's) DestroyPixmap() handler and call it
swap(pExaScr, pScreen, DestroyPixmap);
- if (pScreen->DestroyPixmap)
- ret = pScreen->DestroyPixmap(pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
swap(pExaScr, pScreen, DestroyPixmap);
return ret;
commit 69837185c0e72efa66724725996da751ecac81d0
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Oct 2 17:24:07 2024 +0200
glx: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 90154b404..f8c3a965c 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1391,7 +1391,7 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
err = XaceHookResourceAccess(client, glxDrawableId, X11_RESTYPE_PIXMAP,
pPixmap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (err != Success) {
- (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
return err;
}
commit 0132baa422ba51dbe645e9e13a96396aa00e57d4
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:59:14 2024 +0200
xwayland: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index dd0d71690..2b901431b 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -180,7 +180,7 @@ update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
if (old_pixmap) {
TraverseTree(pRoot, xwl_set_pixmap_visit_window, old_pixmap);
- pScreen->DestroyPixmap(old_pixmap);
+ dixDestroyPixmap(old_pixmap, 0);
}
pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
diff --git a/hw/xwayland/xwayland-window-buffers.c b/hw/xwayland/xwayland-window-buffers.c
index a470ef313..09265078c 100644
--- a/hw/xwayland/xwayland-window-buffers.c
+++ b/hw/xwayland/xwayland-window-buffers.c
@@ -97,10 +97,8 @@ xwl_window_buffer_new(struct xwl_window *xwl_window)
static void
xwl_window_buffer_destroy_pixmap(struct xwl_window_buffer *xwl_window_buffer)
{
- ScreenPtr pScreen = xwl_window_buffer->pixmap->drawable.pScreen;
-
xwl_pixmap_del_buffer_release_cb(xwl_window_buffer->pixmap);
- (*pScreen->DestroyPixmap) (xwl_window_buffer->pixmap);
+ dixDestroyPixmap(xwl_window_buffer->pixmap, 0);
xwl_window_buffer->pixmap = NullPixmap;
}
@@ -363,7 +361,7 @@ xwl_window_realloc_pixmap(struct xwl_window *xwl_window)
window_pixmap->drawable.width,
window_pixmap->drawable.height);
xwl_window_set_pixmap(xwl_window->surface_window, new_window_pixmap);
- screen->DestroyPixmap(window_pixmap);
+ dixDestroyPixmap(window_pixmap, 0);
}
static Bool
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index b717fcf3c..a77f4fb88 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -317,7 +317,7 @@ damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
window_pixmap = xwl_screen->screen->GetWindowPixmap(xwl_window->surface_window);
if (xwl_is_client_pixmap(window_pixmap))
- xwl_screen->screen->DestroyPixmap(xwl_window_swap_pixmap(xwl_window, FALSE));
+ dixDestroyPixmap(xwl_window_swap_pixmap(xwl_window, FALSE), 0);
}
static void
commit 4d1953728e52bb1da0a7d0cb66efa651cd01e88b
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:58:50 2024 +0200
xfree86: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 41b58d9e3..2482530a1 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -370,7 +370,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
if (oldPix->drawable.id)
FreeResource(oldPix->drawable.id, X11_RESTYPE_NONE);
else
- (*pScreen->DestroyPixmap) (oldPix);
+ dixDestroyPixmap(oldPix, 0);
}
free(pScreenPriv->current);
pScreenPriv->current = NULL;
@@ -432,7 +432,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
if (oldPix->drawable.id)
FreeResource(oldPix->drawable.id, X11_RESTYPE_NONE);
else
- (*pScreen->DestroyPixmap) (oldPix);
+ dixDestroyPixmap(oldPix, 0);
}
free(pScreenPriv->current);
pScreenPriv->current = NULL;
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 1325f1f9f..6eb846187 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -428,8 +428,8 @@ DRI2DrawableGone(void *p, XID id)
}
if (pPriv->prime_secondary_pixmap) {
- (*pPriv->prime_secondary_pixmap->primary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap->primary_pixmap);
- (*pPriv->prime_secondary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap);
+ dixDestroyPixmap(pPriv->prime_secondary_pixmap->primary_pixmap, 0);
+ dixDestroyPixmap(pPriv->prime_secondary_pixmap, 0);
}
if (pPriv->buffers != NULL) {
@@ -441,7 +441,7 @@ DRI2DrawableGone(void *p, XID id)
if (pPriv->redirectpixmap) {
(*pDraw->pScreen->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE);
- (*pDraw->pScreen->DestroyPixmap)(pPriv->redirectpixmap);
+ dixDestroyPixmap(pPriv->redirectpixmap, 0);
}
dri2WakeAll(CLIENT_SIGNAL_ANY, pPriv, WAKE_SWAP);
@@ -839,7 +839,7 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
ret = (*primary->ReplaceScanoutPixmap)(pDraw, mpix, TRUE);
if (ret == FALSE) {
- (*primary->DestroyPixmap)(mpix);
+ dixDestroyPixmap(mpix, 0);
return NULL;
}
pPriv->redirectpixmap = mpix;
@@ -848,7 +848,7 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
}
} else if (pPriv->redirectpixmap) {
(*primary->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE);
- (*primary->DestroyPixmap)(pPriv->redirectpixmap);
+ dixDestroyPixmap(pPriv->redirectpixmap, 0);
pPriv->redirectpixmap = NULL;
}
}
@@ -861,8 +861,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
return &pPriv->prime_secondary_pixmap->drawable;
else {
PixmapUnshareSecondaryPixmap(pPriv->prime_secondary_pixmap);
- (*pPriv->prime_secondary_pixmap->primary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap->primary_pixmap);
- (*secondary->DestroyPixmap)(pPriv->prime_secondary_pixmap);
+ dixDestroyPixmap(pPriv->prime_secondary_pixmap->primary_pixmap, 0);
+ dixDestroyPixmap(pPriv->prime_secondary_pixmap, 0);
pPriv->prime_secondary_pixmap = NULL;
}
}
diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c
index af7db7ddc..68765cad8 100644
--- a/hw/xfree86/drivers/modesetting/dri2.c
+++ b/hw/xfree86/drivers/modesetting/dri2.c
@@ -208,7 +208,7 @@ ms_dri2_create_buffer2(ScreenPtr screen, DrawablePtr drawable,
if (buffer->name == -1) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to get DRI2 name for pixmap\n");
- screen->DestroyPixmap(pixmap);
+ dixDestroyPixmap(pixmap, 0);
free(private);
free(buffer);
return NULL;
@@ -247,8 +247,7 @@ static void ms_dri2_destroy_buffer2(ScreenPtr unused, DrawablePtr unused2,
if (buffer->driverPrivate) {
ms_dri2_buffer_private_ptr private = buffer->driverPrivate;
if (--private->refcnt == 0) {
- ScreenPtr screen = private->pixmap->drawable.pScreen;
- screen->DestroyPixmap(private->pixmap);
+ dixDestroyPixmap(private->pixmap, 0);
free(private);
free(buffer);
}
@@ -523,7 +522,7 @@ update_front(DrawablePtr draw, DRI2BufferPtr front)
front->name = name;
- (*screen->DestroyPixmap) (priv->pixmap);
+ dixDestroyPixmap(priv->pixmap, 0);
front->pitch = pixmap->devKind;
front->cpp = pixmap->drawable.bitsPerPixel / 8;
priv->pixmap = pixmap;
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 6d0b4453b..2072ce0c5 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1570,8 +1570,7 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
pScreen->canDoBGNoneRoot = TRUE;
- if (drmmode->fbcon_pixmap)
- pScrn->pScreen->DestroyPixmap(drmmode->fbcon_pixmap);
+ dixDestroyPixmap(drmmode->fbcon_pixmap, 0);
drmmode->fbcon_pixmap = NULL;
#endif
}
@@ -2151,7 +2150,7 @@ drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int height,
if ((*pScreen->ModifyPixmapHeader)(pixmap, width, height, depth,
bitsPerPixel, devKind, pPixData))
return pixmap;
- (*pScreen->DestroyPixmap)(pixmap);
+ dixDestroyPixmap(pixmap, 0);
}
return NullPixmap;
}
@@ -2223,9 +2222,7 @@ drmmode_shadow_fb_destroy(xf86CrtcPtr crtc, PixmapPtr pixmap,
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
- if (pixmap) {
- pixmap->drawable.pScreen->DestroyPixmap(pixmap);
- }
+ dixDestroyPixmap(pixmap, 0);
if (data) {
drmModeRmFB(drmmode->fd, *fb_id);
commit c117925ace592529b0152efea3b1342399b31246
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:58:18 2024 +0200
vfb: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 6452d2556..773831afd 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -730,8 +730,7 @@ vfbCloseScreen(ScreenPtr pScreen)
/*
* fb overwrites miCloseScreen, so do this here
*/
- if (pScreen->devPrivate)
- (*pScreen->DestroyPixmap) (pScreen->devPrivate);
+ dixDestroyPixmap(pScreen->devPrivate, 0);
pScreen->devPrivate = NULL;
return pScreen->CloseScreen(pScreen);
commit 4378656cbbb0e35ae238688b3edabd3ef260a303
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:57:52 2024 +0200
kdrive: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index b7ac56d50..33dcccf8f 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -1655,7 +1655,7 @@ ephyr_glamor_create_screen_resources(ScreenPtr pScreen)
* Thus, delete the current screen pixmap, and put a fresh one in.
*/
old_screen_pixmap = pScreen->GetScreenPixmap(pScreen);
- pScreen->DestroyPixmap(old_screen_pixmap);
+ dixDestroyPixmap(old_screen_pixmap, 0);
screen_pixmap = pScreen->CreatePixmap(pScreen,
pScreen->width,
commit 0a54e24721d0f347cf55b22e71e1e7fc3aba6600
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:57:32 2024 +0200
xnest: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index a50803ea5..f9f60177f 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -224,7 +224,7 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects)
* current pixmap contents.
*/
pGC->clientClip = (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue);
- (*pGC->pScreen->DestroyPixmap) ((PixmapPtr) pValue);
+ dixDestroyPixmap((PixmapPtr) pValue, 0);
pValue = pGC->clientClip;
break;
commit c8607ca66f1bf798f03dbf0b51539298fc5cf09a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:57:05 2024 +0200
render: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/render/glyph.c b/render/glyph.c
index 57aa46789..30f423742 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -608,7 +608,7 @@ miGlyphs(CARD8 op,
maskFormat, CPComponentAlpha, &component_alpha,
serverClient, &error);
if (!pMask) {
- (*pScreen->DestroyPixmap) (pMaskPixmap);
+ dixDestroyPixmap(pMaskPixmap, 0);
return;
}
pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen);
@@ -676,7 +676,7 @@ miGlyphs(CARD8 op,
xSrc + x - xDst,
ySrc + y - yDst, 0, 0, x, y, width, height);
FreePicture((void *) pMask, (XID) 0);
- (*pScreen->DestroyPixmap) (pMaskPixmap);
+ dixDestroyPixmap(pMaskPixmap, 0);
}
}
diff --git a/render/mipict.c b/render/mipict.c
index ac376eb71..0bc5417c6 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -67,7 +67,7 @@ miChangePictureClip(PicturePtr pPicture, int type, void *value, int n)
clientClip = BitmapToRegion(pScreen, (PixmapPtr) value);
if (!clientClip)
return BadAlloc;
- (*pScreen->DestroyPixmap) ((PixmapPtr) value);
+ dixDestroyPixmap((PixmapPtr) value, 0);
break;
case CT_REGION:
clientClip = value;
diff --git a/render/picture.c b/render/picture.c
index 1126eb97e..feb29a7d7 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1416,7 +1416,7 @@ FreePicture(void *value, XID pid)
}
}
else if (pPicture->pDrawable->type == DRAWABLE_PIXMAP) {
- (*pScreen->DestroyPixmap) ((PixmapPtr) pPicture->pDrawable);
+ dixDestroyPixmap((PixmapPtr) pPicture->pDrawable, 0);
}
}
dixFreeObjectWithPrivates(pPicture, PRIVATE_PICTURE);
diff --git a/render/render.c b/render/render.c
index 27dfa38ad..113f6e0c5 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1137,7 +1137,7 @@ ProcRenderAddGlyphs(ClientPtr client)
/* The picture takes a reference to the pixmap, so we
drop ours. */
- (pScreen->DestroyPixmap) (pDstPix);
+ dixDestroyPixmap(pDstPix, 0);
pDstPix = NULL;
if (!pDst) {
@@ -1542,7 +1542,7 @@ ProcRenderCreateCursor(ClientPtr client)
free(mskbits);
return error;
}
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
CompositePicture(PictOpSrc,
pSrc, 0, pPicture, 0, 0, 0, 0, 0, 0, width, height);
(*pScreen->GetImage) (pPicture->pDrawable,
commit d2a93d0346884e3bb51c4a4a15268d3b5d48f111
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:56:38 2024 +0200
randr: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 42421b1ce..2fb92b053 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -382,11 +382,11 @@ rrDestroySharedPixmap(RRCrtcPtr crtc, PixmapPtr pPixmap) {
*/
PixmapUnshareSecondaryPixmap(pPixmap);
- primary->DestroyPixmap(pPixmap->primary_pixmap);
- primary->DestroyPixmap(pPixmap->primary_pixmap);
+ dixDestroyPixmap(pPixmap->primary_pixmap, 0);
+ dixDestroyPixmap(pPixmap->primary_pixmap, 0);
}
- crtc->pScreen->DestroyPixmap(pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
void
@@ -440,7 +440,7 @@ rrCreateSharedPixmap(RRCrtcPtr crtc, ScreenPtr primary,
spix = PixmapShareToSecondary(mpix, crtc->pScreen);
if (spix == NULL) {
- primary->DestroyPixmap(mpix);
+ dixDestroyPixmap(mpix, 0);
return NULL;
}
commit 4628254698cbb000632a66a185c2f2aca4be84ec
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:56:15 2024 +0200
mi: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/mi/miarc.c b/mi/miarc.c
index 9ea4a6155..3223bcb02 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -1112,7 +1112,7 @@ miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
out:
if (fTricky) {
- (*pGCTo->pScreen->DestroyPixmap) ((PixmapPtr) pDrawTo);
+ dixDestroyPixmap((PixmapPtr) pDrawTo, 0);
FreeScratchGC(pGCTo);
}
}
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 305b6fc68..401e16768 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -119,12 +119,11 @@ miDCSwitchScreenCursor(ScreenPtr pScreen, CursorPtr pCursor, PixmapPtr sourceBit
{
miDCScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey);
- if (pScreenPriv->sourceBits)
- (*pScreen->DestroyPixmap)(pScreenPriv->sourceBits);
+ dixDestroyPixmap(pScreenPriv->sourceBits, 0);
pScreenPriv->sourceBits = sourceBits;
if (pScreenPriv->maskBits)
- (*pScreen->DestroyPixmap)(pScreenPriv->maskBits);
+ dixDestroyPixmap(pScreenPriv->maskBits, 0);
pScreenPriv->maskBits = maskBits;
if (pScreenPriv->pPicture)
@@ -203,7 +202,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor)
pGC = GetScratchGC(32, pScreen);
if (!pGC) {
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
return FALSE;
}
ValidateGC(&pPixmap->drawable, pGC);
@@ -214,7 +213,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor)
FreeScratchGC(pGC);
pPicture = CreatePicture(0, &pPixmap->drawable,
pFormat, 0, 0, serverClient, &error);
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
if (!pPicture)
return FALSE;
@@ -230,7 +229,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor)
maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width,
pCursor->bits->height, 1, 0);
if (!maskBits) {
- (*pScreen->DestroyPixmap) (sourceBits);
+ dixDestroyPixmap(sourceBits, 0);
return FALSE;
}
@@ -238,8 +237,8 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor)
pGC = GetScratchGC(1, pScreen);
if (!pGC) {
- (*pScreen->DestroyPixmap) (sourceBits);
- (*pScreen->DestroyPixmap) (maskBits);
+ dixDestroyPixmap(sourceBits, 0);
+ dixDestroyPixmap(maskBits, 0);
return FALSE;
}
@@ -395,8 +394,7 @@ miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
pSave = pBuffer->pSave;
pWin = pScreen->root;
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) {
- if (pSave)
- (*pScreen->DestroyPixmap) (pSave);
+ dixDestroyPixmap(pSave, 0);
pBuffer->pSave = pSave =
(*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0);
if (!pSave)
@@ -513,8 +511,7 @@ miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
* is freed when that root window is destroyed, so don't
* free it again here. */
- if (pBuffer->pSave)
- (*pScreen->DestroyPixmap) (pBuffer->pSave);
+ dixDestroyPixmap(pBuffer->pSave, 0);
free(pBuffer);
dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen,
diff --git a/mi/migc.c b/mi/migc.c
index e4f3b547e..14389b0f5 100644
--- a/mi/migc.c
+++ b/mi/migc.c
@@ -63,7 +63,7 @@ miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
if (type == CT_PIXMAP) {
/* convert the pixmap to a region */
pGC->clientClip = BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue);
- (*pGC->pScreen->DestroyPixmap) (pvalue);
+ dixDestroyPixmap(pvalue, 0);
}
else if (type == CT_REGION) {
/* stuff the region in the GC */
diff --git a/mi/miglblt.c b/mi/miglblt.c
index 4314b4091..accd55ffe 100644
--- a/mi/miglblt.c
+++ b/mi/miglblt.c
@@ -118,7 +118,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp
pGCtmp = GetScratchGC(1, pDrawable->pScreen);
if (!pGCtmp) {
- (*pDrawable->pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
return;
}
@@ -132,7 +132,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp
nbyLine = BitmapBytePad(width);
pbits = xallocarray(height, nbyLine);
if (!pbits) {
- (*pDrawable->pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
FreeScratchGC(pGCtmp);
return;
}
@@ -174,7 +174,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp
}
x += pci->metrics.characterWidth;
}
- (*pDrawable->pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
free(pbits);
FreeScratchGC(pGCtmp);
}
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index cf67baab0..1372cf754 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -125,7 +125,8 @@ miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
static Bool
miCloseScreen(ScreenPtr pScreen)
{
- return ((*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate));
+ dixDestroyPixmap((PixmapPtr) pScreen->devPrivate, 0);
+ return TRUE;
}
static Bool
commit 372a510ef0c69ba65e8da6b422eae970fe3034b2
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:55:50 2024 +0200
miext: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index cecedee7d..c0f08780a 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -103,8 +103,7 @@ shadowCloseScreen(ScreenPtr pScreen)
unwrap(pBuf, pScreen, BlockHandler);
shadowRemove(pScreen, pBuf->pPixmap);
DamageDestroy(pBuf->pDamage);
- if (pBuf->pPixmap)
- pScreen->DestroyPixmap(pBuf->pPixmap);
+ dixDestroyPixmap(pBuf->pPixmap, 0);
free(pBuf);
return pScreen->CloseScreen(pScreen);
}
commit 7a0f8301c5b7de92b374707b53fdd474345c1693
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:55:23 2024 +0200
glamor: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index 428303091..c1a0cb0f0 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -436,7 +436,7 @@ glamor_composite_glyphs(CARD8 op,
glyphs_queued = 0;
}
if (glyph_atlas->atlas) {
- (*screen->DestroyPixmap)(glyph_atlas->atlas);
+ dixDestroyPixmap(glyph_atlas->atlas, 0);
glyph_atlas->atlas = NULL;
}
}
@@ -571,8 +571,7 @@ glamor_free_glyph_atlas(struct glamor_glyph_atlas *atlas)
{
if (!atlas)
return;
- if (atlas->atlas)
- (*atlas->atlas->drawable.pScreen->DestroyPixmap)(atlas->atlas);
+ dixDestroyPixmap(atlas->atlas, 0);
free (atlas);
}
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 668eddc86..e6992deee 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -346,7 +346,7 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to make %dx%dx%dbpp pixmap from GBM bo\n",
width, height, pixmap->drawable.bitsPerPixel);
- screen->DestroyPixmap(exported);
+ dixDestroyPixmap(exported, 0);
gbm_bo_destroy(bo);
return FALSE;
}
@@ -367,7 +367,7 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
/* Swap the devKind into the original pixmap, reflecting the bo's stride */
screen->ModifyPixmapHeader(pixmap, 0, 0, 0, 0, exported->devKind, NULL);
- screen->DestroyPixmap(exported);
+ dixDestroyPixmap(exported, 0);
return TRUE;
}
@@ -632,7 +632,7 @@ glamor_pixmap_from_fds(ScreenPtr screen,
error:
if (ret == FALSE) {
- screen->DestroyPixmap(pixmap);
+ dixDestroyPixmap(pixmap, 0);
return NULL;
}
return pixmap;
@@ -654,7 +654,7 @@ glamor_pixmap_from_fd(ScreenPtr screen,
stride, depth, bpp);
if (ret == FALSE) {
- screen->DestroyPixmap(pixmap);
+ dixDestroyPixmap(pixmap, 0);
return NULL;
}
return pixmap;
commit 08ec122fa7565bb037ded1f014e35cca3d36103e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:54:52 2024 +0200
fb: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 7ea8e660b..d8d9c2d75 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -83,7 +83,7 @@ fbOverlayCloseScreen(ScreenPtr pScreen)
int i;
for (i = 0; i < pScrPriv->nlayers; i++) {
- (*pScreen->DestroyPixmap) (pScrPriv->layer[i].u.run.pixmap);
+ dixDestroyPixmap(pScrPriv->layer[i].u.run.pixmap, 0);
RegionUninit(&pScrPriv->layer[i].u.run.region);
}
return TRUE;
commit 9ca03e6da03b35ad17f50c44f9eebfa229d58643
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:54:33 2024 +0200
exa: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 371301888..3ea4a540e 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -194,7 +194,7 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, unsigned int format)
CPComponentAlpha, &component_alpha, serverClient,
&error);
- (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
+ dixDestroyPixmap(pPixmap, 0); /* picture holds a refcount */
if (!pPicture)
return FALSE;
@@ -728,7 +728,7 @@ exaGlyphs(CARD8 op,
{
PictFormatPtr argbFormat;
- (*pScreen->DestroyPixmap) (pMaskPixmap);
+ dixDestroyPixmap(pMaskPixmap, 0);
if (!pMask)
return;
@@ -751,7 +751,7 @@ exaGlyphs(CARD8 op,
pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, 0, 0,
serverClient, &error);
if (!pMask) {
- (*pScreen->DestroyPixmap) (pMaskPixmap);
+ dixDestroyPixmap(pMaskPixmap, 0);
return;
}
}
@@ -832,6 +832,6 @@ exaGlyphs(CARD8 op,
xSrc + x - first_xOff,
ySrc + y - first_yOff, 0, 0, x, y, width, height);
FreePicture((void *) pMask, (XID) 0);
- (*pScreen->DestroyPixmap) (pMaskPixmap);
+ dixDestroyPixmap(pMaskPixmap, 0);
}
}
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index c77e36261..37fb624da 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -614,7 +614,7 @@ ExaOffscreenDefragment(ScreenPtr pScreen)
pDstPix->drawable.depth = 0;
pDstPix->drawable.bitsPerPixel = 0;
- (*pScreen->DestroyPixmap) (pDstPix);
+ dixDestroyPixmap(pDstPix, 0);
if (area->state == ExaOffscreenAvail && area->size > largest_size)
return area;
diff --git a/exa/exa_render.c b/exa/exa_render.c
index da74f64d7..49a4fdbc6 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -1082,7 +1082,7 @@ exaCreateAlphaPicture(ScreenPtr pScreen,
return 0;
pGC = GetScratchGC(pPixmap->drawable.depth, pScreen);
if (!pGC) {
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
return 0;
}
ValidateGC(&pPixmap->drawable, pGC);
@@ -1095,7 +1095,7 @@ exaCreateAlphaPicture(ScreenPtr pScreen,
FreeScratchGC(pGC);
pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
0, 0, serverClient, &error);
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
return pPicture;
}
commit 4694b8488eeee626016cc0eb9e22c8a758ec4d94
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:53:58 2024 +0200
dri3: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 2c1d5ca85..91240be45 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -243,7 +243,7 @@ proc_dri3_pixmap_from_buffer(ClientPtr client)
pixmap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (rc != Success) {
- (*drawable->pScreen->DestroyPixmap) (pixmap);
+ dixDestroyPixmap(pixmap, 0);
return rc;
}
if (!AddResource(stuff->pixmap, X11_RESTYPE_PIXMAP, (void *) pixmap))
@@ -507,7 +507,7 @@ proc_dri3_pixmap_from_buffers(ClientPtr client)
pixmap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (rc != Success) {
- (*screen->DestroyPixmap) (pixmap);
+ dixDestroyPixmap(pixmap, 0);
return rc;
}
if (!AddResource(stuff->pixmap, X11_RESTYPE_PIXMAP, (void *) pixmap))
commit 668d9fc40ea474021e2c215c46e9c5fc3c08f614
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:53:32 2024 +0200
dbe: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/dbe/midbe.c b/dbe/midbe.c
index 379b7a024..3033062f8 100644
--- a/dbe/midbe.c
+++ b/dbe/midbe.c
@@ -162,7 +162,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
(*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width,
pDbeWindowPriv->height,
pWin->drawable.depth, 0))) {
- (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
+ dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
return BadAlloc;
}
@@ -426,14 +426,11 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
*/
/* Destroy the front and back pixmaps. */
- if (pDbeWindowPriv->pFrontBuffer) {
- (*pDbeWindowPriv->pWindow->drawable.pScreen->
- DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
- }
- if (pDbeWindowPriv->pBackBuffer) {
- (*pDbeWindowPriv->pWindow->drawable.pScreen->
- DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
- }
+ if (pDbeWindowPriv->pFrontBuffer)
+ dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
+
+ if (pDbeWindowPriv->pBackBuffer)
+ dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
} /* miDbeWinPrivDelete() */
/******************************************************************************
@@ -585,13 +582,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
if (!pFrontBuffer || !pBackBuffer) {
/* We failed at creating 1 or 2 of the pixmaps. */
- if (pFrontBuffer) {
- (*pScreen->DestroyPixmap) (pFrontBuffer);
- }
-
- if (pBackBuffer) {
- (*pScreen->DestroyPixmap) (pBackBuffer);
- }
+ dixDestroyPixmap(pFrontBuffer, 0);
+ dixDestroyPixmap(pBackBuffer, 0);
/* Destroy all buffers for this window. */
while (pDbeWindowPriv) {
@@ -642,8 +634,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
* pixmaps.
*/
- (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
- (*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
+ dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
+ dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
pDbeWindowPriv->pFrontBuffer = pFrontBuffer;
pDbeWindowPriv->pBackBuffer = pBackBuffer;
commit eb5476381abdb699778d0387d5f1c6e3c800133d
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:52:40 2024 +0200
composite: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/composite/compalloc.c b/composite/compalloc.c
index e52c009bd..f7048a75b 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -308,7 +308,7 @@ compFreeClientWindow(WindowPtr pWin, XID id)
if (pPixmap) {
compRestoreWindow(pWin, pPixmap);
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
}
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 1970860c3..40a742438 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -180,7 +180,7 @@ compCheckRedirect(WindowPtr pWin)
compSetParentPixmap(pWin);
compRestoreWindow(pWin, pPixmap);
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
}
else if (should) {
@@ -378,13 +378,11 @@ compImplicitRedirect(WindowPtr pWin, WindowPtr pParent)
static void
compFreeOldPixmap(WindowPtr pWin)
{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
if (pWin->redirectDraw != RedirectDrawNone) {
CompWindowPtr cw = GetCompWindow(pWin);
if (cw->pOldPixmap) {
- (*pScreen->DestroyPixmap) (cw->pOldPixmap);
+ dixDestroyPixmap(cw->pOldPixmap, 0);
cw->pOldPixmap = NullPixmap;
}
}
@@ -617,7 +615,7 @@ compDestroyWindow(WindowPtr pWin)
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
compSetParentPixmap(pWin);
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
ret = (*pScreen->DestroyWindow) (pWin);
cs->DestroyWindow = pScreen->DestroyWindow;
commit 5b541780c18923af44fa827441c6c2b418196e62
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:52:07 2024 +0200
dix: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 5f7cfe02d..efb17c734 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -1524,7 +1524,7 @@ ProcCreatePixmap(ClientPtr client)
rc = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP,
pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (rc != Success) {
- (*pDraw->pScreen->DestroyPixmap) (pMap);
+ dixDestroyPixmap(pMap, 0);
return rc;
}
if (AddResource(stuff->pid, X11_RESTYPE_PIXMAP, (void *) pMap))
diff --git a/dix/gc.c b/dix/gc.c
index 5f7535803..ab5844353 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -254,7 +254,7 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
else {
pPixmap->refcnt++;
if (!pGC->tileIsPixel)
- (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap);
+ dixDestroyPixmap(pGC->tile.pixmap, 0);
pGC->tileIsPixel = FALSE;
pGC->tile.pixmap = pPixmap;
}
@@ -271,7 +271,7 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
if (pPixmap)
pPixmap->refcnt++;
if (pGC->stipple)
- (*pGC->pScreen->DestroyPixmap) (pGC->stipple);
+ dixDestroyPixmap(pGC->stipple, 0);
pGC->stipple = pPixmap;
}
break;
@@ -588,8 +588,7 @@ CreateDefaultTile(GCPtr pGC)
(*pGC->pScreen->CreatePixmap) (pGC->pScreen, w, h, pGC->depth, 0);
pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen);
if (!pTile || !pgcScratch) {
- if (pTile)
- (*pTile->drawable.pScreen->DestroyPixmap) (pTile);
+ dixDestroyPixmap(pTile, 0);
if (pgcScratch)
FreeScratchGC(pgcScratch);
return FALSE;
@@ -668,7 +667,7 @@ CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask)
break;
}
if (!pgcDst->tileIsPixel)
- (*pgcDst->pScreen->DestroyPixmap) (pgcDst->tile.pixmap);
+ dixDestroyPixmap(pgcDst->tile.pixmap, 0);
pgcDst->tileIsPixel = pgcSrc->tileIsPixel;
pgcDst->tile = pgcSrc->tile;
if (!pgcDst->tileIsPixel)
@@ -680,7 +679,7 @@ CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask)
if (pgcDst->stipple == pgcSrc->stipple)
break;
if (pgcDst->stipple)
- (*pgcDst->pScreen->DestroyPixmap) (pgcDst->stipple);
+ dixDestroyPixmap(pgcDst->stipple, 0);
pgcDst->stipple = pgcSrc->stipple;
if (pgcDst->stipple)
pgcDst->stipple->refcnt++;
@@ -775,9 +774,9 @@ FreeGC(void *value, XID gid)
(*pGC->funcs->DestroyClip) (pGC);
if (!pGC->tileIsPixel)
- (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap);
+ dixDestroyPixmap(pGC->tile.pixmap, 0);
if (pGC->stipple)
- (*pGC->pScreen->DestroyPixmap) (pGC->stipple);
+ dixDestroyPixmap(pGC->stipple, 0);
if (pGC->funcs)
(*pGC->funcs->DestroyGC) (pGC);
@@ -885,7 +884,7 @@ CreateDefaultStipple(int screenNum)
tmpval[2].val = FillSolid;
pgcScratch = GetScratchGC(1, pScreen);
if (!pgcScratch) {
- (*pScreen->DestroyPixmap) (pScreen->defaultStipple);
+ dixDestroyPixmap(pScreen->defaultStipple, 0);
return FALSE;
}
(void) ChangeGC(NullClient, pgcScratch,
@@ -905,8 +904,7 @@ void
FreeDefaultStipple(int screenNum)
{
ScreenPtr pScreen = screenInfo.screens[screenNum];
-
- (*pScreen->DestroyPixmap) (pScreen->defaultStipple);
+ dixDestroyPixmap(pScreen->defaultStipple, 0);
}
int
diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c
index 012af910e..5747d0b20 100644
--- a/dix/glyphcurs.c
+++ b/dix/glyphcurs.c
@@ -96,8 +96,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm,
CREATE_PIXMAP_USAGE_SCRATCH);
pGC = GetScratchGC(1, pScreen);
if (!ppix || !pGC) {
- if (ppix)
- (*pScreen->DestroyPixmap) (ppix);
+ dixDestroyPixmap(ppix, 0);
if (pGC)
FreeScratchGC(pGC);
free(pbits);
@@ -127,7 +126,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm,
XYPixmap, 1, pbits);
*ppbits = (unsigned char *) pbits;
FreeScratchGC(pGC);
- (*pScreen->DestroyPixmap) (ppix);
+ dixDestroyPixmap(ppix, 0);
return Success;
}
diff --git a/dix/pixmap.c b/dix/pixmap.c
index 020ceb83a..f7812804a 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -63,7 +63,7 @@ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth,
if ((*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth,
bitsPerPixel, devKind, pPixData))
return pPixmap;
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
return NullPixmap;
}
@@ -73,9 +73,8 @@ void
FreeScratchPixmapHeader(PixmapPtr pPixmap)
{
if (pPixmap) {
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
pPixmap->devPrivate.ptr = NULL; /* help catch/avoid heap-use-after-free */
- (*pScreen->DestroyPixmap)(pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
}
@@ -151,7 +150,7 @@ PixmapPtr PixmapShareToSecondary(PixmapPtr pixmap, ScreenPtr secondary)
ret = secondary->SetSharedPixmapBacking(spix, handle);
if (ret == FALSE) {
- secondary->DestroyPixmap(spix);
+ dixDestroyPixmap(spix, 0);
return NULL;
}
diff --git a/dix/window.c b/dix/window.c
index 6b7fc808e..672593512 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -1014,9 +1014,9 @@ FreeWindowResources(WindowPtr pWin)
if (wInputShape(pWin))
RegionDestroy(wInputShape(pWin));
if (pWin->borderIsPixel == FALSE)
- (*pScreen->DestroyPixmap) (pWin->border.pixmap);
+ dixDestroyPixmap(pWin->border.pixmap, 0);
if (pWin->backgroundState == BackgroundPixmap)
- (*pScreen->DestroyPixmap) (pWin->background.pixmap);
+ dixDestroyPixmap(pWin->background.pixmap, 0);
DeleteAllWindowProperties(pWin);
/* We SHOULD check for an error value here XXX */
@@ -1195,7 +1195,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
borderRelative = TRUE;
if (pixID == None) {
if (pWin->backgroundState == BackgroundPixmap)
- (*pScreen->DestroyPixmap) (pWin->background.pixmap);
+ dixDestroyPixmap(pWin->background.pixmap, 0);
if (!pWin->parent)
SetRootWindowBackground(pWin, pScreen, &index2);
else {
@@ -1210,7 +1210,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
goto PatchUp;
}
if (pWin->backgroundState == BackgroundPixmap)
- (*pScreen->DestroyPixmap) (pWin->background.pixmap);
+ dixDestroyPixmap(pWin->background.pixmap, 0);
if (!pWin->parent)
SetRootWindowBackground(pWin, pScreen, &index2);
else
@@ -1229,7 +1229,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
goto PatchUp;
}
if (pWin->backgroundState == BackgroundPixmap)
- (*pScreen->DestroyPixmap) (pWin->background.pixmap);
+ dixDestroyPixmap(pWin->background.pixmap, 0);
pWin->backgroundState = BackgroundPixmap;
pWin->background.pixmap = pPixmap;
pPixmap->refcnt++;
@@ -1245,7 +1245,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
if (pWin->backgroundState == ParentRelative)
borderRelative = TRUE;
if (pWin->backgroundState == BackgroundPixmap)
- (*pScreen->DestroyPixmap) (pWin->background.pixmap);
+ dixDestroyPixmap(pWin->background.pixmap, 0);
pWin->backgroundState = BackgroundPixel;
pWin->background.pixel = (CARD32) *pVlist;
/* background pixel overrides background pixmap,
@@ -1264,7 +1264,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
}
if (pWin->parent->borderIsPixel == TRUE) {
if (pWin->borderIsPixel == FALSE)
- (*pScreen->DestroyPixmap) (pWin->border.pixmap);
+ dixDestroyPixmap(pWin->border.pixmap, 0);
pWin->border = pWin->parent->border;
pWin->borderIsPixel = TRUE;
index2 = CWBorderPixel;
@@ -1283,7 +1283,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
goto PatchUp;
}
if (pWin->borderIsPixel == FALSE)
- (*pScreen->DestroyPixmap) (pWin->border.pixmap);
+ dixDestroyPixmap(pWin->border.pixmap, 0);
pWin->borderIsPixel = FALSE;
pWin->border.pixmap = pPixmap;
pPixmap->refcnt++;
@@ -1296,7 +1296,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
break;
case CWBorderPixel:
if (pWin->borderIsPixel == FALSE)
- (*pScreen->DestroyPixmap) (pWin->border.pixmap);
+ dixDestroyPixmap(pWin->border.pixmap, 0);
pWin->borderIsPixel = TRUE;
pWin->border.pixel = (CARD32) *pVlist;
/* border pixel overrides border pixmap,
commit c0f3b5bceff8223b748c0ade717e3d5a2a072221
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:49:06 2024 +0200
Xext: shm: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/Xext/shm.c b/Xext/shm.c
index b066d05ea..a82fbcd39 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -511,7 +511,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
else
(void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0,
sw, sh, dx, dy);
- (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
}
}
@@ -1001,7 +1001,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
result = XaceHookResourceAccess(client, stuff->pid,
X11_RESTYPE_PIXMAP, pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (result != Success) {
- pDraw->pScreen->DestroyPixmap(pMap);
+ dixDestroyPixmap(pMap, 0);
break;
}
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
@@ -1045,7 +1045,7 @@ fbShmCreatePixmap(ScreenPtr pScreen,
BitsPerPixel(depth),
PixmapBytePad(width, depth),
(void *) addr)) {
- (*pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pPixmap, 0);
return NullPixmap;
}
return pPixmap;
@@ -1116,7 +1116,7 @@ ProcShmCreatePixmap(ClientPtr client)
rc = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP,
pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (rc != Success) {
- pDraw->pScreen->DestroyPixmap(pMap);
+ dixDestroyPixmap(pMap, 0);
return rc;
}
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
commit 7ce19233bc1d9e3ba4f52de3470e4405730a293a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:39:12 2024 +0200
Xext: saver: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/Xext/saver.c b/Xext/saver.c
index 60b250fdd..a91bc0aed 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -277,13 +277,10 @@ setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask)
static void
FreeAttrs(ScreenSaverAttrPtr pAttr)
{
- PixmapPtr pPixmap;
CursorPtr pCursor;
- if ((pPixmap = pAttr->pBackgroundPixmap) != 0)
- (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
- if ((pPixmap = pAttr->pBorderPixmap) != 0)
- (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
+ dixDestroyPixmap(pAttr->pBackgroundPixmap, 0);
+ dixDestroyPixmap(pAttr->pBorderPixmap, 0);
if ((pCursor = pAttr->pCursor) != 0)
FreeCursor(pCursor, (Cursor) 0);
}
commit 984da40fbb1e9479edda2e9e9e8746456e420594
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Mon Sep 30 17:59:28 2024 +0200
doc: document that ScreenRec->DestroyPixmap() shouldn't be called directly
Direct calls to ScreenRec->DestroyPixmap() is fragile and blocks cleaning up
the wrapping jungle, so use the proper dix function instead.
While this function originally wasn't made for that purpose (and so we have an
useless parameter here, and the naming isn't entirely correct), it's the best
effort we have right now, without breaking existing API: it's already exported
since long time, so drivers can be easily converted and still work with both
new and older Xserver ABI versions.
Retrospectively, this already should have been done 20 years ago.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index 7736cb292..20c6cff85 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -3057,6 +3057,14 @@ must deallocate the PixmapRec and all attached devPrivate blocks.
If successful, it returns TRUE.
See Xserver/fb/fbpixmap.c for the sample server implementation.</para>
<para>
+Consumers should never ever call that proc directly, but call dixDestroyPixmap() instead.
+</para>
+<para>
+If it's ever wrapped (by an extension), the wrapping handler must be written
+in a way that it can always be called, even when the private structures are in
+an half-initialized state (error pathes), so no extra unwrapping magic necessary.
+</para>
+<para>
<blockquote><programlisting>
Bool
More information about the xorg-commit
mailing list