aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-08 22:54:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 12:55:04 +0200
commitdfb18f8fe7c921584b5fcc48a88219151bed6ae3 (patch)
tree7b44f5e63a525595f7d6e6055127ecfc52b1d965 /nx-X11/programs
parentcc8d8f72de9d30beb1331ecedfa3b329cb4b36f9 (diff)
downloadnx-libs-dfb18f8fe7c921584b5fcc48a88219151bed6ae3.tar.gz
nx-libs-dfb18f8fe7c921584b5fcc48a88219151bed6ae3.tar.bz2
nx-libs-dfb18f8fe7c921584b5fcc48a88219151bed6ae3.zip
nxagent: simplify nxagentFreeRegion macro
Does not require two parameters. It could be replaced by RegionDestroy() entirely but we leave it to have a match to nxagentCreateRegion().
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c12
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.h3
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GCOps.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c8
5 files changed, 22 insertions, 23 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 6068b16bf..266ea86da 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -941,7 +941,7 @@ nxagentSynchronizeRegionFree:
if (clipRegion != NullRegion)
{
- nxagentFreeRegion(pDrawable, clipRegion);
+ nxagentFreeRegion(clipRegion);
}
SAFE_free(data);
@@ -996,7 +996,7 @@ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox, unsigned int brea
pRegion -> extents.x1, pRegion -> extents.y1, pRegion -> extents.x2, pRegion -> extents.y2);
#endif
- nxagentFreeRegion(pDrawable, pRegion);
+ nxagentFreeRegion(pRegion);
return;
}
@@ -1009,7 +1009,7 @@ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox, unsigned int brea
nxagentSynchronizeRegion(pDrawable, pRegion, breakMask, NULL);
- nxagentFreeRegion(pDrawable, pRegion);
+ nxagentFreeRegion(pRegion);
}
}
@@ -1520,7 +1520,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
RegionUnion(nxagentCorruptedRegion(pDrawable),
nxagentCorruptedRegion(pDrawable), pRegion);
- nxagentFreeRegion(pDrawable, pRegion);
+ nxagentFreeRegion(pRegion);
}
else
{
@@ -2321,7 +2321,7 @@ void nxagentCorruptedRegionOnWindow(void *p0, XID x, void *p2)
RegionIntersect(&visRegion, clipRegion, nxagentCorruptedRegion((DrawablePtr) pWin));
- nxagentFreeRegion(pWin -> drawable.pScreen, clipRegion);
+ nxagentFreeRegion(clipRegion);
if (RegionNil(&visRegion) == 1)
{
@@ -2528,7 +2528,7 @@ nxagentCreateDrawableBitmapEnd:
if (pClipRegion != NullRegion)
{
- nxagentFreeRegion(pDrawable, pClipRegion);
+ nxagentFreeRegion(pClipRegion);
}
if (pGC != NULL)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.h b/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
index 6388d5c12..1101f989f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
@@ -162,8 +162,7 @@ extern int nxagentForceSynchronization;
extern RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
int width, int height);
-#define nxagentFreeRegion(pDrawable, pRegion) \
- RegionDestroy(pRegion);
+#define nxagentFreeRegion(pRegion) RegionDestroy(pRegion);
extern void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion);
extern void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
index 5ac341990..9bce4af0d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
@@ -313,7 +313,7 @@ FIXME: The popup could be synchronized with one single put image,
RegionUninit(&corruptedRegion);
- nxagentFreeRegion(pSrcDrawable, pSrcRegion);
+ nxagentFreeRegion(pSrcRegion);
if (nxagentDrawableStatus(pSrcDrawable) == Synchronized)
{
@@ -511,7 +511,7 @@ FIXME: The popup could be synchronized with one single put image,
if (pClipRegionFree == True)
{
- nxagentFreeRegion(pSrcDrawable, pClipRegion);
+ nxagentFreeRegion(pClipRegion);
}
FreeScratchGC(targetGC);
@@ -527,10 +527,10 @@ FIXME: The popup could be synchronized with one single put image,
* we deallocate it explicitly only if we don't change the clip.
*/
- nxagentFreeRegion(pSrcDrawable, pClipRegion);
+ nxagentFreeRegion(pClipRegion);
}
- nxagentFreeRegion(pSrcDrawable, pCorruptedRegion);
+ nxagentFreeRegion(pCorruptedRegion);
return 1;
}
@@ -562,7 +562,7 @@ FIXME: The popup could be synchronized with one single put image,
RegionUninit(&corruptedRegion);
- nxagentFreeRegion(pSrcDrawable, pSrcRegion);
+ nxagentFreeRegion(pSrcRegion);
}
return 0;
@@ -800,7 +800,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentUnmarkCorruptedRegion(pDstDrawable, pDstRegion);
- nxagentFreeRegion(pDstDrawable, pDstRegion);
+ nxagentFreeRegion(pDstRegion);
}
}
@@ -981,7 +981,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentMarkCorruptedRegion(pDstDrawable, pDstRegion);
- nxagentFreeRegion(pDstDrawable, pDstRegion);
+ nxagentFreeRegion(pDstRegion);
skip = 1;
}
@@ -1009,12 +1009,12 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentUnmarkCorruptedRegion(pDstDrawable, pDstRegion);
- nxagentFreeRegion(pDstDrawable, pDstRegion);
+ nxagentFreeRegion(pDstRegion);
}
RegionUninit(&corruptedRegion);
- nxagentFreeRegion(pSrcDrawable, pSrcRegion);
+ nxagentFreeRegion(pSrcRegion);
}
}
#ifdef TEST
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index 9e50b5d60..9369aeb1e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -864,7 +864,7 @@ nxagentPutImageEnd:
if (pRegion != NullRegion)
{
- nxagentFreeRegion(pDrawable, pRegion);
+ nxagentFreeRegion(pRegion);
}
}
@@ -992,7 +992,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
if (clipRegion != NullRegion)
{
- nxagentFreeRegion(pDrawable, clipRegion);
+ nxagentFreeRegion(clipRegion);
}
y += h;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 6113a419a..673b7114f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -1157,7 +1157,7 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
nxagentMarkCorruptedRegion(pDst -> pDrawable, pDstRegion);
- nxagentFreeRegion(pDst -> pDrawable, pDstRegion);
+ nxagentFreeRegion(pDstRegion);
return;
}
@@ -1326,12 +1326,12 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
(void *) pDst -> pDrawable);
#endif
- nxagentFreeRegion(pDst -> pDrawable, pRegion);
+ nxagentFreeRegion(pRegion);
return;
}
- nxagentFreeRegion(pDst -> pDrawable, pRegion);
+ nxagentFreeRegion(pRegion);
}
/*
@@ -1817,7 +1817,7 @@ FIXME: Is this useful or just a waste of bandwidth?
nxagentMarkCorruptedRegion(pDst -> pDrawable, pDstRegion);
- nxagentFreeRegion(pDst -> pDrawable, pDstRegion);
+ nxagentFreeRegion(pDstRegion);
if (pDst -> pDrawable -> type == DRAWABLE_PIXMAP)
{