aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Image.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-12-30 22:31:01 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-15 16:26:31 +0100
commitfec462906588e9adc4533b3814b200531e527f64 (patch)
treef944e6a42fc8eaba533dcbbed6225bb5246e22db /nx-X11/programs/Xserver/hw/nxagent/Image.c
parent42f76ddeefb18c6e5120d10abc3e13354ff543a0 (diff)
downloadnx-libs-fec462906588e9adc4533b3814b200531e527f64.tar.gz
nx-libs-fec462906588e9adc4533b3814b200531e527f64.tar.bz2
nx-libs-fec462906588e9adc4533b3814b200531e527f64.zip
nxagent: treat all Traps as Booleans everywhere
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Image.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index 79d8c365f..e1f424a16 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -403,7 +403,7 @@ FIXME: Here the split trap is always set and so the caching of the
resource, nxagentSplitTrap);
#endif
- if (nxagentSplitTrap == 1 || nxagentUnpackAlpha[resource] == NULL ||
+ if (nxagentSplitTrap || nxagentUnpackAlpha[resource] == NULL ||
nxagentUnpackAlpha[resource] -> size != size ||
memcmp(nxagentUnpackAlpha[resource] -> data, data, size) != 0)
{
@@ -562,8 +562,8 @@ FIXME: Should use these.
int framebuffer = 1;
int realize = 1;
*/
- if (nxagentGCTrap == 1 && nxagentReconnectTrap == 0 &&
- nxagentFBTrap == 0 && nxagentShmTrap == 0)
+ if (nxagentGCTrap && !nxagentReconnectTrap &&
+ !nxagentFBTrap && !nxagentShmTrap)
{
if (pDrawable -> type == DRAWABLE_PIXMAP)
{
@@ -579,11 +579,11 @@ FIXME: Should use these.
goto nxagentPutImageEnd;
}
- if (nxagentReconnectTrap == 0 &&
- nxagentSplitTrap == 0)
+ if (!nxagentReconnectTrap &&
+ !nxagentSplitTrap)
{
if (pDrawable -> type == DRAWABLE_PIXMAP &&
- nxagentFBTrap == 0 && nxagentShmTrap == 0)
+ !nxagentFBTrap && !nxagentShmTrap)
{
fbPutImage(nxagentVirtualDrawable(pDrawable), pGC, depth,
dstX, dstY, dstWidth, dstHeight, leftPad, format, data);
@@ -683,8 +683,8 @@ FIXME: Do we stream the images from GLX or Xv? If we do that, we
/*
FIXME: Temporarily stream the GLX data.
- && nxagentGlxTrap == 0
- && nxagentXvTrap == 0
+ && !nxagentGlxTrap
+ && !nxagentXvTrap
*/
);
@@ -692,11 +692,11 @@ FIXME: Temporarily stream the GLX data.
* Never split images whose depth is less than 15.
*/
- if (split == 1 && (nxagentSplitTrap == 1 || depth < 15))
+ if (split == 1 && (nxagentSplitTrap || depth < 15))
{
#ifdef TEST
- if (nxagentSplitTrap == 1 ||
- nxagentReconnectTrap == 1)
+ if (nxagentSplitTrap ||
+ nxagentReconnectTrap)
{
fprintf(stderr, "nxagentPutImage: Not splitting with reconnection [%d] trap [%d] "
"depth [%d].\n", nxagentSplitTrap, nxagentReconnectTrap, depth);
@@ -734,7 +734,7 @@ FIXME: Temporarily stream the GLX data.
*/
if (nxagentOption(LinkType) != LINK_TYPE_NONE &&
- (nxagentGlxTrap == 1 || nxagentXvTrap == 1))
+ (nxagentGlxTrap || nxagentXvTrap))
{
#ifdef TEST
fprintf(stderr, "nxagentPutImage: Disabling the use of the cache with GLX or Xvideo.\n");
@@ -1145,7 +1145,7 @@ FIXME: Should use an unpack resource here.
if (w <= IMAGE_PACK_WIDTH || h <= IMAGE_PACK_HEIGHT ||
nxagentImageLength(w, h, format, leftPad, depth) <=
- IMAGE_PACK_LENGTH || nxagentLosslessTrap == 1)
+ IMAGE_PACK_LENGTH || nxagentLosslessTrap)
{
if (nxagentPackLossless == PACK_NONE)
{
@@ -1219,8 +1219,8 @@ FIXME: Should try to locate the image anyway, if the lossless trap is
method.
*/
if (nxagentNeedCache(plainImage, packMethod) &&
- nxagentGlxTrap == 0 && nxagentXvTrap == 0 &&
- nxagentLosslessTrap == 0 && NXImageCacheSize > 0)
+ !nxagentGlxTrap && !nxagentXvTrap &&
+ !nxagentLosslessTrap && NXImageCacheSize > 0)
{
/*
* Be sure that the padding bits are cleaned before calculating