summaryrefslogtreecommitdiffstats
path: root/common/rfb/zrleDecode.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-03-17 14:35:51 +0100
committerPierre Ossman <ossman@cendio.se>2014-07-07 14:42:08 +0200
commit7b5c069d2e7eaa1748507a03697c14900258e507 (patch)
tree245936793e9607ce98dd89e98c1fdd0ac6b2d3ce /common/rfb/zrleDecode.h
parent65ad3224e920deecb91a3c28e15341c8584a372c (diff)
downloadtigervnc-7b5c069d2e7eaa1748507a03697c14900258e507.tar.gz
tigervnc-7b5c069d2e7eaa1748507a03697c14900258e507.zip
Push encoding specific formats into the encoders and decoders
Keep the generic stream classes clean and general.
Diffstat (limited to 'common/rfb/zrleDecode.h')
-rw-r--r--common/rfb/zrleDecode.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/zrleDecode.h b/common/rfb/zrleDecode.h
index d26d4d3e..207a6c74 100644
--- a/common/rfb/zrleDecode.h
+++ b/common/rfb/zrleDecode.h
@@ -41,11 +41,11 @@ namespace rfb {
#ifdef CPIXEL
#define PIXEL_T rdr::CONCAT2E(U,BPP)
-#define READ_PIXEL CONCAT2E(readOpaque,CPIXEL)
+#define READ_PIXEL(is) CONCAT2E(readOpaque,CPIXEL)(is)
#define ZRLE_DECODE CONCAT2E(zrleDecode,CPIXEL)
#else
#define PIXEL_T rdr::CONCAT2E(U,BPP)
-#define READ_PIXEL CONCAT2E(readOpaque,BPP)
+#define READ_PIXEL(is) is->CONCAT2E(readOpaque,BPP)()
#define ZRLE_DECODE CONCAT2E(zrleDecode,BPP)
#endif
@@ -74,7 +74,7 @@ void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
PIXEL_T palette[128];
for (int i = 0; i < palSize; i++) {
- palette[i] = zis->READ_PIXEL();
+ palette[i] = READ_PIXEL(zis);
}
if (palSize == 1) {
@@ -90,7 +90,7 @@ void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
#ifdef CPIXEL
for (PIXEL_T* ptr = buf; ptr < buf+t.area(); ptr++) {
- *ptr = zis->READ_PIXEL();
+ *ptr = READ_PIXEL(zis);
}
#else
zis->readBytes(buf, t.area() * (BPP / 8));
@@ -130,7 +130,7 @@ void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
PIXEL_T* ptr = buf;
PIXEL_T* end = ptr + t.area();
while (ptr < end) {
- PIXEL_T pix = zis->READ_PIXEL();
+ PIXEL_T pix = READ_PIXEL(zis);
int len = 1;
int b;
do {