diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-02-15 09:37:18 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-02-15 09:43:02 +0100 |
commit | 586742b715a3e3451a4587439778c410a1970cdd (patch) | |
tree | afec05c1ea5a1f9fcdc1a54f4d2b5050706e75c2 /nx-X11/programs/Xserver/hw/nxagent/Image.c | |
parent | b61934be2e9b4a8d3112270b0e691d47f99ba39f (diff) | |
download | nx-libs-586742b715a3e3451a4587439778c410a1970cdd.tar.gz nx-libs-586742b715a3e3451a4587439778c410a1970cdd.tar.bz2 nx-libs-586742b715a3e3451a4587439778c410a1970cdd.zip |
Revert "nxagent: rework Bool handling"
This reverts commit 16cd2bbe1c4425e3fa557f9ca0723aa94a50b071.
It turned out that I had missed some of the Booleans being actually
tristate variables. I think I can fix this (they do not need to be
tristate) but I revert this for now to get back to a working state
(there are reports about non-working fullscreen mode and reconnect
problems).
Refers to ArcticaProject/nx-libs#772
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Image.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Image.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c index c022ebde7..a5e19724b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Image.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c @@ -428,7 +428,7 @@ FIXME: Here the split trap is always set and so the caching of resource, nxagentSplitTrap); #endif - if (nxagentSplitTrap || nxagentUnpackAlpha[resource] == NULL || + if (nxagentSplitTrap == 1 || nxagentUnpackAlpha[resource] == NULL || nxagentUnpackAlpha[resource] -> size != size || memcmp(nxagentUnpackAlpha[resource] -> data, data, size) != 0) { @@ -584,8 +584,8 @@ FIXME: Should use these. int framebuffer = 1; int realize = 1; */ - if (nxagentGCTrap && !nxagentReconnectTrap && - !nxagentFBTrap && !nxagentShmTrap) + if (nxagentGCTrap == 1 && nxagentReconnectTrap == 0 && + nxagentFBTrap == 0 && nxagentShmTrap == 0) { if (pDrawable -> type == DRAWABLE_PIXMAP) { @@ -601,10 +601,11 @@ FIXME: Should use these. goto nxagentPutImageEnd; } - if (!nxagentReconnectTrap && !nxagentSplitTrap) + if (nxagentReconnectTrap == 0 && + nxagentSplitTrap == 0) { if (pDrawable -> type == DRAWABLE_PIXMAP && - !nxagentFBTrap && !nxagentShmTrap) + nxagentFBTrap == 0 && nxagentShmTrap == 0) { fbPutImage(nxagentVirtualDrawable(pDrawable), pGC, depth, dstX, dstY, dstWidth, dstHeight, leftPad, format, data); @@ -692,11 +693,11 @@ FIXME: Should use these. /* FIXME: Should we disable the split with link LAN? - split = (nxagentOption(Streaming) && + split = (nxagentOption(Streaming) == 1 && nxagentOption(LinkType) != LINK_TYPE_NONE && nxagentOption(LinkType) != LINK_TYPE_LAN */ - split = (nxagentOption(Streaming) && + split = (nxagentOption(Streaming) == 1 && nxagentOption(LinkType) != LINK_TYPE_NONE /* FIXME: Do we stream the images from GLX or Xv? If we do that, @@ -709,8 +710,8 @@ FIXME: Do we stream the images from GLX or Xv? If we do that, /* FIXME: Temporarily stream the GLX data. - && !nxagentGlxTrap - && !nxagentXvTrap + && nxagentGlxTrap == 0 + && nxagentXvTrap == 0 */ ); @@ -719,11 +720,12 @@ FIXME: Temporarily stream the GLX data. * is less than 15. */ - if (split == 1 && (nxagentSplitTrap || depth < 15)) + if (split == 1 && (nxagentSplitTrap == 1 || depth < 15)) { #ifdef TEST - if (nxagentSplitTrap || nxagentReconnectTrap) + if (nxagentSplitTrap == 1 || + nxagentReconnectTrap == 1) { fprintf(stderr, "nxagentPutImage: Not splitting with reconnection [%d] trap [%d] " "depth [%d].\n", nxagentSplitTrap, nxagentReconnectTrap, depth); @@ -765,7 +767,7 @@ FIXME: Temporarily stream the GLX data. */ if (nxagentOption(LinkType) != LINK_TYPE_NONE && - (nxagentGlxTrap || nxagentXvTrap)) + (nxagentGlxTrap == 1 || nxagentXvTrap == 1)) { #ifdef TEST fprintf(stderr, "nxagentPutImage: Disabling the use of the cache with GLX or Xvideo.\n"); @@ -972,7 +974,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth, bytesPerLine = nxagentImagePad(w, format, leftPad, depth); - if (nxagentOption(Shadow) && format == ZPixmap && + if (nxagentOption(Shadow) == 1 && format == ZPixmap && (nxagentOption(XRatio) != DONT_SCALE || nxagentOption(YRatio) != DONT_SCALE) && pDrawable == (DrawablePtr) nxagentShadowPixmapPtr) @@ -1195,7 +1197,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) + IMAGE_PACK_LENGTH || nxagentLosslessTrap == 1) { if (nxagentPackLossless == PACK_NONE) { @@ -1271,8 +1273,8 @@ FIXME: Should try to locate the image anyway, if the lossless again using the preferred method. */ if (nxagentNeedCache(plainImage, packMethod) && - !nxagentGlxTrap && !nxagentXvTrap && - !nxagentLosslessTrap && NXImageCacheSize > 0) + nxagentGlxTrap == 0 && nxagentXvTrap == 0 && + nxagentLosslessTrap == 0 && NXImageCacheSize > 0) { /* * Be sure that the padding bits are @@ -1339,7 +1341,7 @@ FIXME: There should be a callback registered by the agent that * compress better. */ - if (lossless == 0 && nxagentOption(Adaptive)) + if (lossless == 0 && nxagentOption(Adaptive) == 1) { int ratio = nxagentUniquePixels(plainImage); |