diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-01-31 12:37:32 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-07 14:50:28 +0200 |
commit | 668468b3d43d5ea1562ebc0be8de0c98c5601a60 (patch) | |
tree | 80bbb90fb5f00335a7e85c297eadd40b0780dc92 /common/rfb/ZRLEDecoder.cxx | |
parent | fdba3fe884d5b43e07d7d49033c83f2f11bf524c (diff) | |
download | tigervnc-668468b3d43d5ea1562ebc0be8de0c98c5601a60.tar.gz tigervnc-668468b3d43d5ea1562ebc0be8de0c98c5601a60.zip |
Encoders/decoders should track the connection object
The connection object is a much more appropriate object for the
decoders and encoders to keep track of. Besides the streams, it also
contains state like connection parameters.
Diffstat (limited to 'common/rfb/ZRLEDecoder.cxx')
-rw-r--r-- | common/rfb/ZRLEDecoder.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/rfb/ZRLEDecoder.cxx b/common/rfb/ZRLEDecoder.cxx index d4d3444d..7e933a8f 100644 --- a/common/rfb/ZRLEDecoder.cxx +++ b/common/rfb/ZRLEDecoder.cxx @@ -16,6 +16,7 @@ * USA. */ #include <rfb/CMsgReader.h> +#include <rfb/CConnection.h> #include <rfb/CMsgHandler.h> #include <rfb/ZRLEDecoder.h> @@ -57,7 +58,7 @@ static inline rdr::U32 readOpaque24B(rdr::InStream* is) #undef CPIXEL #undef BPP -ZRLEDecoder::ZRLEDecoder(CMsgReader* reader) : Decoder(reader) +ZRLEDecoder::ZRLEDecoder(CConnection* conn) : Decoder(conn) { } @@ -67,9 +68,9 @@ ZRLEDecoder::~ZRLEDecoder() void ZRLEDecoder::readRect(const Rect& r, CMsgHandler* handler) { - rdr::InStream* is = reader->getInStream(); - rdr::U8* buf = reader->getImageBuf(64 * 64 * 4); - switch (reader->bpp()) { + rdr::InStream* is = conn->getInStream(); + rdr::U8* buf = conn->reader()->getImageBuf(64 * 64 * 4); + switch (conn->cp.pf().bpp) { case 8: zrleDecode8 (r, is, &zis, (rdr::U8*) buf, handler); break; case 16: zrleDecode16(r, is, &zis, (rdr::U16*)buf, handler); break; case 32: |