diff options
Diffstat (limited to 'xorg-server/glx/renderpixswap.c')
-rw-r--r-- | xorg-server/glx/renderpixswap.c | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/xorg-server/glx/renderpixswap.c b/xorg-server/glx/renderpixswap.c index a73ed1e3c..637385a65 100644 --- a/xorg-server/glx/renderpixswap.c +++ b/xorg-server/glx/renderpixswap.c @@ -44,48 +44,52 @@ #include "glthread.h" #include "dispatch.h" -void __glXDispSwap_SeparableFilter2D(GLbyte *pc) +void +__glXDispSwap_SeparableFilter2D(GLbyte * pc) { __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; + (__GLXdispatchConvolutionFilterHeader *) pc; GLint hdrlen, image1len; + __GLX_DECLARE_SWAP_VARIABLES; hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + __GLX_SWAP_INT((GLbyte *) & hdr->rowLength); + __GLX_SWAP_INT((GLbyte *) & hdr->skipRows); + __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *) & hdr->alignment); - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); + __GLX_SWAP_INT((GLbyte *) & hdr->target); + __GLX_SWAP_INT((GLbyte *) & hdr->internalformat); + __GLX_SWAP_INT((GLbyte *) & hdr->width); + __GLX_SWAP_INT((GLbyte *) & hdr->height); + __GLX_SWAP_INT((GLbyte *) & hdr->format); + __GLX_SWAP_INT((GLbyte *) & hdr->type); /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, !hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, hdr->alignment) ); + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + CALL_PixelStorei(GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, !hdr->swapBytes)); + CALL_PixelStorei(GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst)); + CALL_PixelStorei(GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, hdr->rowLength)); + CALL_PixelStorei(GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, hdr->skipRows)); + CALL_PixelStorei(GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, hdr->skipPixels)); + CALL_PixelStorei(GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, hdr->alignment)); /* XXX check this usage - internal code called - ** a version without the packing parameters - */ + ** a version without the packing parameters + */ image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, - 0, hdr->rowLength, 0, hdr->skipRows, - hdr->alignment); + 0, hdr->rowLength, 0, hdr->skipRows, + hdr->alignment); image1len = __GLX_PAD(image1len); - - CALL_SeparableFilter2D( GET_DISPATCH(), (hdr->target, hdr->internalformat, - hdr->width, hdr->height, hdr->format, hdr->type, - ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)) ); + CALL_SeparableFilter2D(GET_DISPATCH(), (hdr->target, hdr->internalformat, + hdr->width, hdr->height, + hdr->format, hdr->type, + ((GLubyte *) hdr + hdrlen), + ((GLubyte *) hdr + hdrlen + + image1len))); } |