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
b8017065
You need to sign in or sign up before continuing.
Commit
b8017065
authored
Dec 30, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: handle RegionNil macro as Boolean
just as the rest of the Xserver is alsow doing
parent
06833b96
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
33 deletions
+33
-33
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+19
-19
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+1
-1
GCOps.c
nx-X11/programs/Xserver/hw/nxagent/GCOps.c
+6
-6
Image.c
nx-X11/programs/Xserver/hw/nxagent/Image.c
+2
-2
Render.c
nx-X11/programs/Xserver/hw/nxagent/Render.c
+1
-1
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+1
-1
Split.c
nx-X11/programs/Xserver/hw/nxagent/Split.c
+2
-2
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+1
-1
No files found.
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
b8017065
...
...
@@ -396,7 +396,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* The bitmap to synchronize is clipped.
*/
if
(
RegionNil
(
clipRegion
)
==
1
)
if
(
RegionNil
(
clipRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSynchronizeRegion: The bitmap region [%d,%d,%d,%d] is not viewable. "
...
...
@@ -418,7 +418,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
}
else
{
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
)
==
1
)
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSynchronizeRegion: Region [%d,%d,%d,%d] is nil. Skipping synchronization.
\n
"
,
...
...
@@ -451,7 +451,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
RegionIntersect
(
clipRegion
,
clipRegion
,
nxagentCorruptedRegion
(
pDrawable
));
if
(
RegionNil
(
clipRegion
)
==
1
)
if
(
RegionNil
(
clipRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSynchronizeRegion: The corrupted region [%d,%d,%d,%d] is not viewable "
...
...
@@ -473,7 +473,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
{
RegionIntersect
(
clipRegion
,
clipRegion
,
pRegion
);
if
(
RegionNil
(
clipRegion
)
==
1
)
if
(
RegionNil
(
clipRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSynchronizeRegion: Region requested [%d,%d,%d,%d] already "
...
...
@@ -888,7 +888,7 @@ nxagentSynchronizeRegionStop:
if
(
pDrawable
->
type
==
DRAWABLE_PIXMAP
&&
nxagentIsCorruptedBackground
((
PixmapPtr
)
pDrawable
)
==
1
&&
RegionNil
(
&
exposeRegion
)
==
0
)
!
RegionNil
(
&
exposeRegion
)
)
{
struct
nxagentExposeBackground
eb
=
{
.
pBackground
=
(
PixmapPtr
)
pDrawable
,
...
...
@@ -994,7 +994,7 @@ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox, unsigned int brea
pBox
->
x2
-
pBox
->
x1
,
pBox
->
y2
-
pBox
->
y1
);
if
(
RegionNil
(
pRegion
)
==
1
)
if
(
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSynchronizeBox: Resulting region [%d,%d,%d,%d] is nil. Skipping synchronization.
\n
"
,
...
...
@@ -1441,7 +1441,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
* clipmask.
*/
if
(
RegionNil
(
pRegion
)
==
0
&&
if
(
!
RegionNil
(
pRegion
)
&&
pGC
!=
NULL
&&
pGC
->
clientClip
!=
NULL
&&
pGC
->
clientClipType
==
CT_REGION
)
{
...
...
@@ -1478,7 +1478,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
void
nxagentMarkCorruptedRegion
(
DrawablePtr
pDrawable
,
RegionPtr
pRegion
)
{
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
)
==
1
)
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentMarkCorruptedRegion: Region [%d,%d,%d,%d] is nil. Skipping operation.
\n
"
,
...
...
@@ -1552,7 +1552,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
void
nxagentUnmarkCorruptedRegion
(
DrawablePtr
pDrawable
,
RegionPtr
pRegion
)
{
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
)
==
1
)
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentUnmarkCorruptedRegion: Region [%d,%d,%d,%d] is nil. Skipping operation.
\n
"
,
...
...
@@ -2001,7 +2001,7 @@ unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel)
unsigned
long
nxagentGetRegionColor
(
DrawablePtr
pDrawable
,
RegionPtr
pRegion
)
{
if
(
RegionNil
(
pRegion
)
==
1
)
if
(
RegionNil
(
pRegion
))
{
return
nxagentGetDrawableColor
(
pDrawable
);
}
...
...
@@ -2055,7 +2055,7 @@ void nxagentClearRegion(DrawablePtr pDrawable, RegionPtr pRegion)
return
;
}
if
(
pRegion
==
NullRegion
||
RegionNil
(
pRegion
)
==
1
)
if
(
pRegion
==
NullRegion
||
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentClearRegion: The region is empty. Exiting.
\n
"
);
...
...
@@ -2145,7 +2145,7 @@ void nxagentClearRegion(DrawablePtr pDrawable, RegionPtr pRegion)
void
nxagentFillRemoteRegion
(
DrawablePtr
pDrawable
,
RegionPtr
pRegion
)
{
if
(
RegionNil
(
pRegion
)
==
1
)
if
(
RegionNil
(
pRegion
))
{
return
;
}
...
...
@@ -2328,7 +2328,7 @@ void nxagentCorruptedRegionOnWindow(void *p0, XID x, void *p2)
nxagentFreeRegion
(
clipRegion
);
if
(
RegionNil
(
&
visRegion
)
==
1
)
if
(
RegionNil
(
&
visRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCorruptedRegionOnWindow: The corrupted region of window at [%p] is hidden.
\n
"
,
...
...
@@ -2455,7 +2455,7 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
RegionIntersect
(
pClipRegion
,
pClipRegion
,
nxagentCorruptedRegion
(
pDrawable
));
if
(
RegionNil
(
pClipRegion
)
==
1
)
if
(
RegionNil
(
pClipRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCreateDrawableBitmap: The corrupted region is not visible. Skipping bitmap creation.
\n
"
);
...
...
@@ -2780,14 +2780,14 @@ void nxagentUnmarkExposedRegion(WindowPtr pWin, RegionPtr pRegion, RegionPtr pOt
{
RegionRec
clipRegion
;
if
(
pRegion
!=
NullRegion
&&
RegionNil
(
pRegion
)
==
0
&&
if
(
pRegion
!=
NullRegion
&&
!
RegionNil
(
pRegion
)
&&
nxagentDrawableStatus
((
DrawablePtr
)
pWin
)
==
NotSynchronized
)
{
RegionInit
(
&
clipRegion
,
NullBox
,
1
);
RegionCopy
(
&
clipRegion
,
pRegion
);
if
(
pOther
!=
NullRegion
&&
RegionNil
(
pOther
)
==
0
)
if
(
pOther
!=
NullRegion
&&
!
RegionNil
(
pOther
)
)
{
RegionUnion
(
&
clipRegion
,
&
clipRegion
,
pOther
);
}
...
...
@@ -2871,7 +2871,7 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
RegionSubtract
(
&
expose
,
&
expose
,
nxagentCorruptedRegion
((
DrawablePtr
)
pWin
));
if
(
RegionNil
(
&
pWin
->
clipList
)
!=
0
)
if
(
RegionNil
(
&
pWin
->
clipList
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSendBackgroundExpose: Exposures deferred because the window "
...
...
@@ -2897,7 +2897,7 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
pBackingStore
=
(
miBSWindowPtr
)
pWin
->
backStorage
;
if
((
pBackingStore
!=
NULL
)
&&
(
RegionNil
(
&
pBackingStore
->
SavedRegion
)
==
0
))
if
((
pBackingStore
!=
NULL
)
&&
!
RegionNil
(
&
pBackingStore
->
SavedRegion
))
{
RegionTranslate
(
&
expose
,
-
pWin
->
drawable
.
x
,
-
pWin
->
drawable
.
y
);
...
...
@@ -2931,7 +2931,7 @@ void nxagentExposeBackgroundPredicate(void *p0, XID x1, void *p2)
struct
nxagentExposeBackground
*
pPair
=
p2
;
if
(
RegionNil
(
pPair
->
pExpose
)
!=
0
)
if
(
RegionNil
(
pPair
->
pExpose
))
{
return
;
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
b8017065
...
...
@@ -4065,7 +4065,7 @@ void nxagentSynchronizeExpose(void)
(
nxagentExposeQueueHead
.
remoteRegion
),
(
nxagentExposeQueueHead
.
localRegion
));
if
(
RegionNil
(
nxagentExposeQueueHead
.
remoteRegion
)
==
0
&&
if
(
!
RegionNil
(
nxagentExposeQueueHead
.
remoteRegion
)
&&
((
pWin
->
eventMask
|
wOtherEventMasks
(
pWin
))
&
ExposureMask
))
{
#ifdef TEST
...
...
nx-X11/programs/Xserver/hw/nxagent/GCOps.c
View file @
b8017065
...
...
@@ -301,7 +301,7 @@ FIXME: The popup could be synchronized with one single put image,
RegionIntersect
(
&
corruptedRegion
,
pSrcRegion
,
nxagentCorruptedRegion
(
pSrcDrawable
));
if
(
RegionNil
(
&
corruptedRegion
)
==
0
)
if
(
!
RegionNil
(
&
corruptedRegion
)
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].
\n
"
,
...
...
@@ -422,17 +422,17 @@ FIXME: The popup could be synchronized with one single put image,
* corrupted region.
*/
if
(
RegionNil
(
pClipRegion
)
==
0
)
if
(
!
RegionNil
(
pClipRegion
)
)
{
nxagentUnmarkCorruptedRegion
(
pDstDrawable
,
pClipRegion
);
}
if
(
RegionNil
(
pCorruptedRegion
)
==
0
)
if
(
!
RegionNil
(
pCorruptedRegion
)
)
{
nxagentMarkCorruptedRegion
(
pDstDrawable
,
pCorruptedRegion
);
}
if
(
RegionNil
(
pClipRegion
)
==
0
)
if
(
!
RegionNil
(
pClipRegion
)
)
{
Bool
pClipRegionFree
=
True
;
...
...
@@ -550,7 +550,7 @@ FIXME: The popup could be synchronized with one single put image,
RegionIntersect
(
&
corruptedRegion
,
pSrcRegion
,
nxagentCorruptedRegion
(
pSrcDrawable
));
if
(
RegionNil
(
&
corruptedRegion
)
==
0
)
if
(
!
RegionNil
(
&
corruptedRegion
)
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].
\n
"
,
...
...
@@ -996,7 +996,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
RegionIntersect
(
&
corruptedRegion
,
pSrcRegion
,
nxagentCorruptedRegion
(
pSrcDrawable
));
if
(
RegionNil
(
&
corruptedRegion
)
==
0
)
if
(
!
RegionNil
(
&
corruptedRegion
)
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCopyPlane: Forcing the synchronization of source drawable at [%p].
\n
"
,
...
...
nx-X11/programs/Xserver/hw/nxagent/Image.c
View file @
b8017065
...
...
@@ -544,7 +544,7 @@ void nxagentPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
pRegion
=
nxagentCreateRegion
(
pDrawable
,
pGC
,
dstX
,
dstY
,
dstWidth
,
dstHeight
);
if
(
RegionNil
(
pRegion
)
==
1
)
if
(
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentPutImage: WARNING! Prevented operation on fully clipped "
...
...
@@ -987,7 +987,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
clipRegion
=
nxagentCreateRegion
(
pDrawable
,
pGC
,
x
,
y
,
w
,
h
);
}
if
(
clipRegion
==
NullRegion
||
RegionNil
(
clipRegion
)
==
0
)
if
(
clipRegion
==
NullRegion
||
!
RegionNil
(
clipRegion
)
)
{
nxagentPutSubImage
(
pDrawable
,
pGC
,
depth
,
x
,
y
,
w
,
h
,
leftPad
,
format
,
data
,
pVisual
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Render.c
View file @
b8017065
...
...
@@ -1314,7 +1314,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
RegionPtr
pRegion
=
nxagentCreateRegion
(
pDst
->
pDrawable
,
NULL
,
glyphBox
.
x1
,
glyphBox
.
y1
,
glyphBox
.
x2
-
glyphBox
.
x1
,
glyphBox
.
y2
-
glyphBox
.
y1
);
if
(
RegionNil
(
pRegion
)
==
1
)
if
(
RegionNil
(
pRegion
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentGlyphs: WARNING! Glyphs prevented on hidden window at [%p].
\n
"
,
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
b8017065
...
...
@@ -2903,7 +2903,7 @@ int nxagentShadowSendUpdates(int *suspended)
{
*
suspended
=
0
;
if
(
RegionNil
(
&
nxagentShadowUpdateRegion
)
==
1
)
if
(
RegionNil
(
&
nxagentShadowUpdateRegion
))
{
return
0
;
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Split.c
View file @
b8017065
...
...
@@ -612,7 +612,7 @@ void nxagentValidateSplit(DrawablePtr pDrawable, RegionPtr pRegion)
RegionIntersect
(
&
tmpRegion
,
pResource
->
region
,
pRegion
);
if
(
RegionNil
(
&
tmpRegion
)
==
0
)
if
(
!
RegionNil
(
&
tmpRegion
)
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentValidateSplit: Marking the overlapping commits as invalid "
...
...
@@ -1074,7 +1074,7 @@ void nxagentHandleEndSplitEvent(int resource)
if
(
pResource
->
drawable
!=
NULL
&&
pResource
->
region
!=
NullRegion
)
{
if
(
RegionNil
(
pResource
->
region
)
==
0
)
if
(
!
RegionNil
(
pResource
->
region
)
)
{
RegionSubtract
(
nxagentCorruptedRegion
(
pResource
->
drawable
),
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
b8017065
...
...
@@ -2195,7 +2195,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
RegionUnion
(
&
temp
,
&
temp
,
other_exposed
);
}
if
(
RegionNil
(
&
temp
)
==
0
)
if
(
!
RegionNil
(
&
temp
)
)
{
RegionTranslate
(
&
temp
,
-
(
pWin
->
drawable
.
x
),
-
(
pWin
->
drawable
.
y
));
...
...
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