Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
dfb18f8f
Commit
dfb18f8f
authored
Jan 08, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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().
parent
cc8d8f72
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
23 deletions
+22
-23
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+6
-6
Drawable.h
nx-X11/programs/Xserver/hw/nxagent/Drawable.h
+1
-2
GCOps.c
nx-X11/programs/Xserver/hw/nxagent/GCOps.c
+9
-9
Image.c
nx-X11/programs/Xserver/hw/nxagent/Image.c
+2
-2
Render.c
nx-X11/programs/Xserver/hw/nxagent/Render.c
+4
-4
No files found.
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
dfb18f8f
...
...
@@ -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
(
p
Drawable
,
p
Region
);
nxagentFreeRegion
(
pRegion
);
return
;
}
...
...
@@ -1009,7 +1009,7 @@ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox, unsigned int brea
nxagentSynchronizeRegion
(
pDrawable
,
pRegion
,
breakMask
,
NULL
);
nxagentFreeRegion
(
p
Drawable
,
p
Region
);
nxagentFreeRegion
(
pRegion
);
}
}
...
...
@@ -1520,7 +1520,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
RegionUnion
(
nxagentCorruptedRegion
(
pDrawable
),
nxagentCorruptedRegion
(
pDrawable
),
pRegion
);
nxagentFreeRegion
(
p
Drawable
,
p
Region
);
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
(
p
Drawable
,
p
ClipRegion
);
nxagentFreeRegion
(
pClipRegion
);
}
if
(
pGC
!=
NULL
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Drawable.h
View file @
dfb18f8f
...
...
@@ -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
);
...
...
nx-X11/programs/Xserver/hw/nxagent/GCOps.c
View file @
dfb18f8f
...
...
@@ -313,7 +313,7 @@ FIXME: The popup could be synchronized with one single put image,
RegionUninit
(
&
corruptedRegion
);
nxagentFreeRegion
(
pSrc
Drawable
,
pSrc
Region
);
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
(
p
SrcDrawable
,
p
ClipRegion
);
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
(
p
SrcDrawable
,
p
ClipRegion
);
nxagentFreeRegion
(
pClipRegion
);
}
nxagentFreeRegion
(
p
SrcDrawable
,
p
CorruptedRegion
);
nxagentFreeRegion
(
pCorruptedRegion
);
return
1
;
}
...
...
@@ -562,7 +562,7 @@ FIXME: The popup could be synchronized with one single put image,
RegionUninit
(
&
corruptedRegion
);
nxagentFreeRegion
(
pSrc
Drawable
,
pSrc
Region
);
nxagentFreeRegion
(
pSrcRegion
);
}
return
0
;
...
...
@@ -800,7 +800,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentUnmarkCorruptedRegion
(
pDstDrawable
,
pDstRegion
);
nxagentFreeRegion
(
pDst
Drawable
,
pDst
Region
);
nxagentFreeRegion
(
pDstRegion
);
}
}
...
...
@@ -981,7 +981,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentMarkCorruptedRegion
(
pDstDrawable
,
pDstRegion
);
nxagentFreeRegion
(
pDst
Drawable
,
pDst
Region
);
nxagentFreeRegion
(
pDstRegion
);
skip
=
1
;
}
...
...
@@ -1009,12 +1009,12 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentUnmarkCorruptedRegion
(
pDstDrawable
,
pDstRegion
);
nxagentFreeRegion
(
pDst
Drawable
,
pDst
Region
);
nxagentFreeRegion
(
pDstRegion
);
}
RegionUninit
(
&
corruptedRegion
);
nxagentFreeRegion
(
pSrc
Drawable
,
pSrc
Region
);
nxagentFreeRegion
(
pSrcRegion
);
}
}
#ifdef TEST
...
...
nx-X11/programs/Xserver/hw/nxagent/Image.c
View file @
dfb18f8f
...
...
@@ -864,7 +864,7 @@ nxagentPutImageEnd:
if
(
pRegion
!=
NullRegion
)
{
nxagentFreeRegion
(
p
Drawable
,
p
Region
);
nxagentFreeRegion
(
pRegion
);
}
}
...
...
@@ -992,7 +992,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
if
(
clipRegion
!=
NullRegion
)
{
nxagentFreeRegion
(
pDrawable
,
clipRegion
);
nxagentFreeRegion
(
clipRegion
);
}
y
+=
h
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Render.c
View file @
dfb18f8f
...
...
@@ -1157,7 +1157,7 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
nxagentMarkCorruptedRegion
(
pDst
->
pDrawable
,
pDstRegion
);
nxagentFreeRegion
(
pDst
->
pDrawable
,
pDst
Region
);
nxagentFreeRegion
(
pDstRegion
);
return
;
}
...
...
@@ -1326,12 +1326,12 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
(
void
*
)
pDst
->
pDrawable
);
#endif
nxagentFreeRegion
(
p
Dst
->
pDrawable
,
p
Region
);
nxagentFreeRegion
(
pRegion
);
return
;
}
nxagentFreeRegion
(
p
Dst
->
pDrawable
,
p
Region
);
nxagentFreeRegion
(
pRegion
);
}
/*
...
...
@@ -1817,7 +1817,7 @@ FIXME: Is this useful or just a waste of bandwidth?
nxagentMarkCorruptedRegion
(
pDst
->
pDrawable
,
pDstRegion
);
nxagentFreeRegion
(
pDst
->
pDrawable
,
pDst
Region
);
nxagentFreeRegion
(
pDstRegion
);
if
(
pDst
->
pDrawable
->
type
==
DRAWABLE_PIXMAP
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment