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/HextileDecoder.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/HextileDecoder.cxx')
-rw-r--r-- | common/rfb/HextileDecoder.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/rfb/HextileDecoder.cxx b/common/rfb/HextileDecoder.cxx index dbf75c94..9b335fe9 100644 --- a/common/rfb/HextileDecoder.cxx +++ b/common/rfb/HextileDecoder.cxx @@ -16,6 +16,7 @@ * USA. */ #include <rfb/CMsgReader.h> +#include <rfb/CConnection.h> #include <rfb/CMsgHandler.h> #include <rfb/HextileDecoder.h> @@ -31,7 +32,7 @@ using namespace rfb; #include <rfb/hextileDecode.h> #undef BPP -HextileDecoder::HextileDecoder(CMsgReader* reader) : Decoder(reader) +HextileDecoder::HextileDecoder(CConnection* conn) : Decoder(conn) { } @@ -41,9 +42,9 @@ HextileDecoder::~HextileDecoder() void HextileDecoder::readRect(const Rect& r, CMsgHandler* handler) { - rdr::InStream* is = reader->getInStream(); - rdr::U8* buf = reader->getImageBuf(16 * 16 * 4); - switch (reader->bpp()) { + rdr::InStream* is = conn->getInStream(); + rdr::U8* buf = conn->reader()->getImageBuf(16 * 16 * 4); + switch (conn->cp.pf().bpp) { case 8: hextileDecode8 (r, is, (rdr::U8*) buf, handler); break; case 16: hextileDecode16(r, is, (rdr::U16*)buf, handler); break; case 32: hextileDecode32(r, is, (rdr::U32*)buf, handler); break; |