diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-26 22:20:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-26 22:20:00 +0000 |
commit | 555e551c46f5c9dbd74f92239c0078a6feb65568 (patch) | |
tree | a6a8386ea7e9e1095291ef60bbdab7a86058a5de /nuttx/graphics/nxglib/nxglib_bitblit.h | |
parent | 2371b78045295bfddaf54c65b579f804ef0b58b0 (diff) | |
download | px4-nuttx-555e551c46f5c9dbd74f92239c0078a6feb65568.tar.gz px4-nuttx-555e551c46f5c9dbd74f92239c0078a6feb65568.tar.bz2 px4-nuttx-555e551c46f5c9dbd74f92239c0078a6feb65568.zip |
Add more rasterizers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1316 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_bitblit.h')
-rw-r--r-- | nuttx/graphics/nxglib/nxglib_bitblit.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_bitblit.h b/nuttx/graphics/nxglib/nxglib_bitblit.h index c53e369cf..523b55597 100644 --- a/nuttx/graphics/nxglib/nxglib_bitblit.h +++ b/nuttx/graphics/nxglib/nxglib_bitblit.h @@ -123,8 +123,8 @@ # define NXGL_MEMSET(dest,value,width) \ { \ FAR ubyte *_ptr = (FAR ubyte*)dest; \ - int nbytes = NXGL_SCALEX(width); \ - while (nbytes--) \ + int _nby = NXGL_SCALEX(width); \ + while (_nby--) \ { \ *_ptr++ = value; \ } \ @@ -133,8 +133,8 @@ { \ FAR ubyte *_dptr = (FAR ubyte*)dest; \ FAR ubyte *_sptr = (FAR ubyte*)src; \ - int nbytes = NXGL_SCALEX(width); \ - while (nbytes--) \ + int _nby = NXGL_SCALEX(width); \ + while (_nby--) \ { \ *_dptr++ = *_sptr++; \ } \ @@ -143,8 +143,9 @@ #elif NXGLIB_BITSPERPIXEL == 24 # define NXGL_MEMSET(dest,value,width) \ { \ - FAR ubyte *_ptr = (FAR ubyte*)dest; \ - while (width--) \ + FAR ubyte *_ptr = (FAR ubyte*)dest; \ + nxgl_coord_t _npix = width; \ + while (_npix--) \ { \ *_ptr++ = value; \ *_ptr++ = value >> 8; \ @@ -153,9 +154,10 @@ } # define NXGL_MEMCPY(dest,src,width) \ { \ - FAR ubyte *_dptr = (FAR ubyte*)dest; \ - FAR ubyte *_sptr = (FAR ubyte*)src; \ - while (width--) \ + FAR ubyte *_dptr = (FAR ubyte*)dest; \ + FAR ubyte *_sptr = (FAR ubyte*)src; \ + nxgl_coord_t _npix = width; \ + while (_npix--) \ { \ *_dptr++ = *_sptr++; \ *_dptr++ = *_sptr++; \ @@ -166,7 +168,8 @@ # define NXGL_MEMSET(dest,value,width) \ { \ FAR nx_pixel_t *_ptr = (FAR ubyte*)dest; \ - while (width--) \ + nxgl_coord_t _npix = width; \ + while (_npix--) \ { \ *_ptr++ = value; \ } \ @@ -175,7 +178,8 @@ { \ FAR nx_pixel_t *_dptr = (FAR ubyte*)dest; \ FAR nx_pixel_t *_sptr = (FAR ubyte*)src; \ - while (width--) \ + nxgl_coord_t _npix = width; \ + while (_npix--) \ { \ *_dptr++ = *_sptr++; \ } \ |