aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/TightDecoder.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-06-18 15:44:26 +0200
committerPierre Ossman <ossman@cendio.se>2018-11-01 16:11:42 +0100
commitb14a6bc1aacc3238a1e318d9f165d25674f34d45 (patch)
tree2ba37543fa3941d738ef73a080ae24750ac125a8 /common/rfb/TightDecoder.cxx
parent9312b0e3e16a0eee66945a1220d914067132de9a (diff)
downloadtigervnc-b14a6bc1aacc3238a1e318d9f165d25674f34d45.tar.gz
tigervnc-b14a6bc1aacc3238a1e318d9f165d25674f34d45.zip
Split out ServerParams from ConnParams
We need to track different things in the server and client, so separate things to two independent structures to keep things more clear.
Diffstat (limited to 'common/rfb/TightDecoder.cxx')
-rw-r--r--common/rfb/TightDecoder.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index cc786f5b..fad4731c 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -25,7 +25,7 @@
#include <rdr/MemInStream.h>
#include <rdr/OutStream.h>
-#include <rfb/ConnParams.h>
+#include <rfb/ServerParams.h>
#include <rfb/Exception.h>
#include <rfb/PixelBuffer.h>
#include <rfb/TightConstants.h>
@@ -55,7 +55,7 @@ TightDecoder::~TightDecoder()
}
void TightDecoder::readRect(const Rect& r, rdr::InStream* is,
- const ConnParams& cp, rdr::OutStream* os)
+ const ServerParams& server, rdr::OutStream* os)
{
rdr::U8 comp_ctl;
@@ -66,10 +66,10 @@ void TightDecoder::readRect(const Rect& r, rdr::InStream* is,
// "Fill" compression type.
if (comp_ctl == tightFill) {
- if (cp.pf().is888())
+ if (server.pf().is888())
os->copyBytes(is, 3);
else
- os->copyBytes(is, cp.pf().bpp/8);
+ os->copyBytes(is, server.pf().bpp/8);
return;
}
@@ -106,13 +106,13 @@ void TightDecoder::readRect(const Rect& r, rdr::InStream* is,
palSize = is->readU8() + 1;
os->writeU8(palSize - 1);
- if (cp.pf().is888())
+ if (server.pf().is888())
os->copyBytes(is, palSize * 3);
else
- os->copyBytes(is, palSize * cp.pf().bpp/8);
+ os->copyBytes(is, palSize * server.pf().bpp/8);
break;
case tightFilterGradient:
- if (cp.pf().bpp == 8)
+ if (server.pf().bpp == 8)
throw Exception("TightDecoder: invalid BPP for gradient filter");
break;
case tightFilterCopy:
@@ -129,10 +129,10 @@ void TightDecoder::readRect(const Rect& r, rdr::InStream* is,
rowSize = (r.width() + 7) / 8;
else
rowSize = r.width();
- } else if (cp.pf().is888()) {
+ } else if (server.pf().is888()) {
rowSize = r.width() * 3;
} else {
- rowSize = r.width() * cp.pf().bpp/8;
+ rowSize = r.width() * server.pf().bpp/8;
}
dataSize = r.height() * rowSize;
@@ -154,7 +154,7 @@ bool TightDecoder::doRectsConflict(const Rect& rectA,
const Rect& rectB,
const void* bufferB,
size_t buflenB,
- const ConnParams& cp)
+ const ServerParams& server)
{
rdr::U8 comp_ctl_a, comp_ctl_b;
@@ -177,11 +177,11 @@ bool TightDecoder::doRectsConflict(const Rect& rectA,
}
void TightDecoder::decodeRect(const Rect& r, const void* buffer,
- size_t buflen, const ConnParams& cp,
+ size_t buflen, const ServerParams& server,
ModifiablePixelBuffer* pb)
{
const rdr::U8* bufptr;
- const PixelFormat& pf = cp.pf();
+ const PixelFormat& pf = server.pf();
rdr::U8 comp_ctl;