summaryrefslogtreecommitdiffstats
path: root/common/rfb/PixelBuffer.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-01-28 14:13:12 +0100
committerPierre Ossman <ossman@cendio.se>2014-07-07 13:27:08 +0200
commit945cddacef4ff607017cd62f580ea682cbd45806 (patch)
tree97b2ef9643851907325bd57b6db688117314b056 /common/rfb/PixelBuffer.cxx
parent823665c23920ef0917b2036079b4be2951445e2c (diff)
downloadtigervnc-945cddacef4ff607017cd62f580ea682cbd45806.tar.gz
tigervnc-945cddacef4ff607017cd62f580ea682cbd45806.zip
Be more consistent in referring to pixel byte streams as buffers
Diffstat (limited to 'common/rfb/PixelBuffer.cxx')
-rw-r--r--common/rfb/PixelBuffer.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/rfb/PixelBuffer.cxx b/common/rfb/PixelBuffer.cxx
index 293403b6..9d151b97 100644
--- a/common/rfb/PixelBuffer.cxx
+++ b/common/rfb/PixelBuffer.cxx
@@ -48,7 +48,7 @@ ColourMap* PixelBuffer::getColourMap() const {return colourmap;}
void
PixelBuffer::getImage(void* imageBuf, const Rect& r, int outStride) {
int inStride;
- const U8* data = getPixelsR(r, &inStride);
+ const U8* data = getBuffer(r, &inStride);
// We assume that the specified rectangle is pre-clipped to the buffer
int bytesPerPixel = format.bpp/8;
int inBytesPerRow = inStride * bytesPerPixel;
@@ -154,7 +154,7 @@ void FullFramePixelBuffer::setPF(const PixelFormat &pf) {
int FullFramePixelBuffer::getStride() const { return width(); }
-rdr::U8* FullFramePixelBuffer::getPixelsRW(const Rect& r, int* stride)
+rdr::U8* FullFramePixelBuffer::getBufferRW(const Rect& r, int* stride)
{
*stride = getStride();
return &data[(r.tl.x + (r.tl.y * *stride)) * format.bpp/8];
@@ -163,14 +163,14 @@ rdr::U8* FullFramePixelBuffer::getPixelsRW(const Rect& r, int* stride)
void FullFramePixelBuffer::fillRect(const Rect& r, Pixel pix) {
int stride;
- U8 *buf = getPixelsRW(r, &stride);
+ U8 *buf = getBufferRW(r, &stride);
fillRectFn(buf, stride, r, pix);
}
void FullFramePixelBuffer::imageRect(const Rect& r, const void* pixels, int srcStride) {
int bytesPerPixel = getPF().bpp/8;
int destStride;
- U8* dest = getPixelsRW(r, &destStride);
+ U8* dest = getBufferRW(r, &destStride);
int bytesPerDestRow = bytesPerPixel * destStride;
if (!srcStride) srcStride = r.width();
int bytesPerSrcRow = bytesPerPixel * srcStride;
@@ -188,7 +188,7 @@ void FullFramePixelBuffer::maskRect(const Rect& r, const void* pixels, const voi
Rect cr = getRect().intersect(r);
if (cr.is_empty()) return;
int stride;
- U8* data = getPixelsRW(cr, &stride);
+ U8* data = getBufferRW(cr, &stride);
U8* mask = (U8*) mask_;
int w = cr.width();
int h = cr.height();
@@ -226,7 +226,7 @@ void FullFramePixelBuffer::maskRect(const Rect& r, Pixel pixel, const void* mask
Rect cr = getRect().intersect(r);
if (cr.is_empty()) return;
int stride;
- U8* data = getPixelsRW(cr, &stride);
+ U8* data = getBufferRW(cr, &stride);
U8* mask = (U8*) mask_;
int w = cr.width();
int h = cr.height();
@@ -286,7 +286,7 @@ void FullFramePixelBuffer::copyRect(const Rect &rect, const Point &move_by_delta
if (srect.is_empty())
return;
- data = getPixelsRW(getRect(), &stride);
+ data = getBufferRW(getRect(), &stride);
bytesPerPixel = getPF().bpp/8;
bytesPerRow = stride * bytesPerPixel;
bytesPerMemCpy = drect.width() * bytesPerPixel;