aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/ZRLEEncoder.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-01-21 14:45:10 +0100
committerPierre Ossman <ossman@cendio.se>2014-07-07 14:42:08 +0200
commit717c07b9671badeef0c18c91cf17fe9747559787 (patch)
treed4ad9cfc9e04cb0453118869c5cfe2ec660320f7 /common/rfb/ZRLEEncoder.cxx
parentc0b1aa021dff606c32aed0f1ac38ab51baf093af (diff)
downloadtigervnc-717c07b9671badeef0c18c91cf17fe9747559787.tar.gz
tigervnc-717c07b9671badeef0c18c91cf17fe9747559787.zip
Remove partial update functionality
Get rid of the ability of encoders to only send part of the rectangle they are given as we don't want partial updates anyway.
Diffstat (limited to 'common/rfb/ZRLEEncoder.cxx')
-rw-r--r--common/rfb/ZRLEEncoder.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/common/rfb/ZRLEEncoder.cxx b/common/rfb/ZRLEEncoder.cxx
index e70706b5..7e00fad2 100644
--- a/common/rfb/ZRLEEncoder.cxx
+++ b/common/rfb/ZRLEEncoder.cxx
@@ -55,19 +55,17 @@ ZRLEEncoder::~ZRLEEncoder()
{
}
-bool ZRLEEncoder::writeRect(const Rect& r, TransImageGetter* ig, Rect* actual)
+void ZRLEEncoder::writeRect(const Rect& r, TransImageGetter* ig)
{
rdr::U8* imageBuf = writer->getImageBuf(64 * 64 * 4 + 4);
mos.clear();
- bool wroteAll = true;
- *actual = r;
switch (writer->bpp()) {
case 8:
- wroteAll = zrleEncode8(r, &mos, &zos, imageBuf, actual, ig);
+ zrleEncode8(r, &mos, &zos, imageBuf, ig);
break;
case 16:
- wroteAll = zrleEncode16(r, &mos, &zos, imageBuf, actual, ig);
+ zrleEncode16(r, &mos, &zos, imageBuf, ig);
break;
case 32:
{
@@ -80,25 +78,24 @@ bool ZRLEEncoder::writeRect(const Rect& r, TransImageGetter* ig, Rect* actual)
if ((fitsInLS3Bytes && pf.isLittleEndian()) ||
(fitsInMS3Bytes && pf.isBigEndian()))
{
- wroteAll = zrleEncode24A(r, &mos, &zos, imageBuf, actual, ig);
+ zrleEncode24A(r, &mos, &zos, imageBuf, ig);
}
else if ((fitsInLS3Bytes && pf.isBigEndian()) ||
(fitsInMS3Bytes && pf.isLittleEndian()))
{
- wroteAll = zrleEncode24B(r, &mos, &zos, imageBuf, actual, ig);
+ zrleEncode24B(r, &mos, &zos, imageBuf, ig);
}
else
{
- wroteAll = zrleEncode32(r, &mos, &zos, imageBuf, actual, ig);
+ zrleEncode32(r, &mos, &zos, imageBuf, ig);
}
break;
}
}
- writer->startRect(*actual, encodingZRLE);
+ writer->startRect(r, encodingZRLE);
rdr::OutStream* os = writer->getOutStream();
os->writeU32(mos.length());
os->writeBytes(mos.data(), mos.length());
writer->endRect();
- return wroteAll;
}