summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/rfb/hextileDecode.h15
-rw-r--r--common/rfb/zrleDecode.h66
2 files changed, 0 insertions, 81 deletions
diff --git a/common/rfb/hextileDecode.h b/common/rfb/hextileDecode.h
index 77befc7d..7aa04d91 100644
--- a/common/rfb/hextileDecode.h
+++ b/common/rfb/hextileDecode.h
@@ -69,13 +69,9 @@ void HEXTILE_DECODE (const Rect& r, rdr::InStream* is, PIXEL_T* buf
if (tileType & hextileBgSpecified)
bg = is->READ_PIXEL();
-#ifdef FAVOUR_FILL_RECT
- FILL_RECT(t, bg);
-#else
int len = t.area();
PIXEL_T* ptr = (PIXEL_T*)buf;
while (len-- > 0) *ptr++ = bg;
-#endif
if (tileType & hextileFgSpecified)
fg = is->READ_PIXEL();
@@ -91,14 +87,6 @@ void HEXTILE_DECODE (const Rect& r, rdr::InStream* is, PIXEL_T* buf
int xy = is->readU8();
int wh = is->readU8();
-#ifdef FAVOUR_FILL_RECT
- Rect s;
- s.tl.x = t.tl.x + ((xy >> 4) & 15);
- s.tl.y = t.tl.y + (xy & 15);
- s.br.x = s.tl.x + ((wh >> 4) & 15) + 1;
- s.br.y = s.tl.y + (wh & 15) + 1;
- FILL_RECT(s, fg);
-#else
int x = ((xy >> 4) & 15);
int y = (xy & 15);
int w = ((wh >> 4) & 15) + 1;
@@ -110,12 +98,9 @@ void HEXTILE_DECODE (const Rect& r, rdr::InStream* is, PIXEL_T* buf
while (len-- > 0) *ptr++ = fg;
ptr += rowAdd;
}
-#endif
}
}
-#ifndef FAVOUR_FILL_RECT
IMAGE_RECT(t, buf);
-#endif
}
}
}
diff --git a/common/rfb/zrleDecode.h b/common/rfb/zrleDecode.h
index 8f6f7927..d26d4d3e 100644
--- a/common/rfb/zrleDecode.h
+++ b/common/rfb/zrleDecode.h
@@ -121,12 +121,6 @@ void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
}
}
-#ifdef FAVOUR_FILL_RECT
- //fprintf(stderr,"copying data to screen %dx%d at %d,%d\n",
- //t.width(),t.height(),t.tl.x,t.tl.y);
- IMAGE_RECT(t,buf);
-#endif
-
} else {
if (palSize == 0) {
@@ -149,36 +143,7 @@ void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
throw Exception ("ZRLE decode error");
}
-#ifdef FAVOUR_FILL_RECT
- int i = ptr - buf;
- ptr += len;
-
- int runX = i % t.width();
- int runY = i / t.width();
-
- if (runX + len > t.width()) {
- if (runX != 0) {
- FILL_RECT(Rect(t.tl.x+runX, t.tl.y+runY, t.width()-runX, 1),
- pix);
- len -= t.width()-runX;
- runX = 0;
- runY++;
- }
-
- if (len > t.width()) {
- FILL_RECT(Rect(t.tl.x, t.tl.y+runY, t.width(), len/t.width()),
- pix);
- runY += len / t.width();
- len = len % t.width();
- }
- }
-
- if (len != 0) {
- FILL_RECT(Rect(t.tl.x+runX, t.tl.y+runY, len, 1), pix);
- }
-#else
while (len-- > 0) *ptr++ = pix;
-#endif
}
} else {
@@ -207,45 +172,14 @@ void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
PIXEL_T pix = palette[index];
-#ifdef FAVOUR_FILL_RECT
- int i = ptr - buf;
- ptr += len;
-
- int runX = i % t.width();
- int runY = i / t.width();
-
- if (runX + len > t.width()) {
- if (runX != 0) {
- FILL_RECT(Rect(t.tl.x+runX, t.tl.y+runY, t.width()-runX, 1),
- pix);
- len -= t.width()-runX;
- runX = 0;
- runY++;
- }
-
- if (len > t.width()) {
- FILL_RECT(Rect(t.tl.x, t.tl.y+runY, t.width(), len/t.width()),
- pix);
- runY += len / t.width();
- len = len % t.width();
- }
- }
-
- if (len != 0) {
- FILL_RECT(Rect(t.tl.x+runX, t.tl.y+runY, len, 1), pix);
- }
-#else
while (len-- > 0) *ptr++ = pix;
-#endif
}
}
}
-#ifndef FAVOUR_FILL_RECT
//fprintf(stderr,"copying data to screen %dx%d at %d,%d\n",
//t.width(),t.height(),t.tl.x,t.tl.y);
IMAGE_RECT(t,buf);
-#endif
}
}