diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-09-06 04:08:21 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2020-01-05 22:37:36 +0100 |
commit | 8e66435a54f2d8c74249329503555e3e216b369b (patch) | |
tree | faa85444c48a067b83bfbd99b7fe2e7a5c289d78 | |
parent | 41bc1de9868233f155b459a3be0f821cc39ff931 (diff) | |
download | nx-libs-8e66435a54f2d8c74249329503555e3e216b369b.tar.gz nx-libs-8e66435a54f2d8c74249329503555e3e216b369b.tar.bz2 nx-libs-8e66435a54f2d8c74249329503555e3e216b369b.zip |
GCOps.c: code simplification / scope improvements
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index b4ddd5643..5ac341990 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c @@ -296,7 +296,6 @@ FIXME: The popup could be synchronized with one single put image, #endif RegionRec corruptedRegion; - RegionInit(&corruptedRegion, NullBox, 1); RegionIntersect(&corruptedRegion, @@ -374,7 +373,6 @@ FIXME: The popup could be synchronized with one single put image, else { RegionRec tmpRegion; - RegionInit(&tmpRegion, NullBox, 1); #ifdef DEBUG @@ -540,14 +538,13 @@ FIXME: The popup could be synchronized with one single put image, { RegionPtr pSrcRegion = nxagentCreateRegion(pSrcDrawable, NULL, srcx, srcy, width, height); - RegionRec corruptedRegion; - #ifdef DEBUG fprintf(stderr, "nxagentDeferCopyArea: Source region [%d,%d,%d,%d].\n", pSrcRegion -> extents.x1, pSrcRegion -> extents.y1, pSrcRegion -> extents.x2, pSrcRegion -> extents.y2); #endif + RegionRec corruptedRegion; RegionInit(&corruptedRegion, NullBox, 1); RegionIntersect(&corruptedRegion, @@ -728,9 +725,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, unsigned int format = (depth == 1) ? XYPixmap : ZPixmap; - int leftPad = 0; - - int length = nxagentImageLength(width, height, format, leftPad, depth); + int length = nxagentImageLength(width, height, format, 0, depth); if ((data = malloc(length)) == NULL) { @@ -742,7 +737,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, } unsigned long planeMask = 0xffffffff; - fbGetImage(nxagentVirtualDrawable(pSrcDrawable), srcx, srcy, width, height, format, planeMask, data); /* @@ -751,7 +745,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, */ nxagentPutImage(pDstDrawable, pGC, depth, dstx, dsty, - width, height, leftPad, format, data); + width, height, 0, format, data); #ifdef TEST fprintf(stderr,"nxagentCopyArea: Realize Pixmap %p virtual %p x %d y %d w %d h %d\n", @@ -939,9 +933,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, unsigned int format = (depth == 1) ? XYPixmap : ZPixmap; - int leftPad = 0; - - int length = nxagentImageLength(width, height, format, leftPad, depth); + int length = nxagentImageLength(width, height, format, 0, depth); if ((data = malloc(length)) == NULL) { @@ -953,7 +945,6 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, } unsigned long planeMask = 0xffffffff; - fbGetImage(nxagentVirtualDrawable(pSrcDrawable), srcx, srcy, width, height, format, planeMask, data); /* @@ -962,7 +953,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, */ nxagentPutImage(pDstDrawable, pGC, depth, dstx, dsty, - width, height, leftPad, format, data); + width, height, 0, format, data); #ifdef TEST fprintf(stderr,"nxagentCopyPlane: Synchronize Pixmap %p virtual %p x %d y %d w %d h %d \n", |