diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-01-22 11:28:05 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-07 13:27:09 +0200 |
commit | a10d8fec7fdf860addbe2287cd345ad09b344478 (patch) | |
tree | 57167955c71ec45180009e8161f5597c7872375b /common/rfb/PixelFormat.cxx | |
parent | 8432ec16a1764ff57587e24ad9f6479484d350ec (diff) | |
download | tigervnc-a10d8fec7fdf860addbe2287cd345ad09b344478.tar.gz tigervnc-a10d8fec7fdf860addbe2287cd345ad09b344478.zip |
Consistent use of stride vs pitch
Consistently use the term stride rather than pitch. Also
consistently represent the stride in number of pixels rather
than number of bytes. There is so much code that assumes
proper alignment already that we do not need the extra resolution.
Diffstat (limited to 'common/rfb/PixelFormat.cxx')
-rw-r--r-- | common/rfb/PixelFormat.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/rfb/PixelFormat.cxx b/common/rfb/PixelFormat.cxx index c70a1701..6a5fc96d 100644 --- a/common/rfb/PixelFormat.cxx +++ b/common/rfb/PixelFormat.cxx @@ -180,7 +180,7 @@ void PixelFormat::bufferFromRGB(rdr::U8 *dst, const rdr::U8* src, } void PixelFormat::bufferFromRGB(rdr::U8 *dst, const rdr::U8* src, - int w, int pitch, int h, ColourMap* cm) const + int w, int stride, int h, ColourMap* cm) const { if (is888()) { // Optimised common case @@ -198,7 +198,7 @@ void PixelFormat::bufferFromRGB(rdr::U8 *dst, const rdr::U8* src, x = dst + (48 - redShift - greenShift - blueShift)/8; } - int dstPad = pitch - w * 4; + int dstPad = (stride - w) * 4; while (h--) { int w_ = w; while (w_--) { @@ -218,7 +218,7 @@ void PixelFormat::bufferFromRGB(rdr::U8 *dst, const rdr::U8* src, } } else { // Generic code - int dstPad = pitch - w * 4; + int dstPad = (stride - w) * 4; while (h--) { int w_ = w; while (w_--) { @@ -295,7 +295,7 @@ void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, int pixels, Co void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, - int w, int pitch, int h, ColourMap* cm) const + int w, int stride, int h, ColourMap* cm) const { if (is888()) { // Optimised common case @@ -311,7 +311,7 @@ void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, b = src + blueShift/8; } - int srcPad = pitch - w * 4; + int srcPad = (stride - w) * 4; while (h--) { int w_ = w; while (w_--) { @@ -328,7 +328,7 @@ void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, } } else { // Generic code - int srcPad = pitch - w * bpp/8; + int srcPad = (stride - w) * bpp/8; while (h--) { int w_ = w; while (w_--) { |