diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-11-10 13:02:12 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-11-27 10:57:41 +0100 |
commit | 8635062c071d23bf75dc4d9be598ee39a735d891 (patch) | |
tree | 974a2256c37ef5b3fbcd9d8dac77ff39e4fe6201 /common/rfb/ZRLEDecoder.cxx | |
parent | f22d350e75e798863927c54031fc5dc5e84ae3c4 (diff) | |
download | tigervnc-8635062c071d23bf75dc4d9be598ee39a735d891.tar.gz tigervnc-8635062c071d23bf75dc4d9be598ee39a735d891.zip |
Decouple decoders from CConnection
Diffstat (limited to 'common/rfb/ZRLEDecoder.cxx')
-rw-r--r-- | common/rfb/ZRLEDecoder.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/rfb/ZRLEDecoder.cxx b/common/rfb/ZRLEDecoder.cxx index 60e5dd14..1328012d 100644 --- a/common/rfb/ZRLEDecoder.cxx +++ b/common/rfb/ZRLEDecoder.cxx @@ -15,8 +15,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ -#include <rfb/CMsgReader.h> -#include <rfb/CConnection.h> +#include <rdr/InStream.h> +#include <rfb/ConnParams.h> #include <rfb/PixelBuffer.h> #include <rfb/ZRLEDecoder.h> @@ -58,7 +58,7 @@ static inline rdr::U32 readOpaque24B(rdr::InStream* is) #undef CPIXEL #undef BPP -ZRLEDecoder::ZRLEDecoder(CConnection* conn) : Decoder(conn) +ZRLEDecoder::ZRLEDecoder() { } @@ -66,11 +66,11 @@ ZRLEDecoder::~ZRLEDecoder() { } -void ZRLEDecoder::readRect(const Rect& r, ModifiablePixelBuffer* pb) +void ZRLEDecoder::readRect(const Rect& r, rdr::InStream* is, + const ConnParams& cp, ModifiablePixelBuffer* pb) { - rdr::InStream* is = conn->getInStream(); - rdr::U8* buf = conn->reader()->getImageBuf(64 * 64 * 4); - const rfb::PixelFormat& pf = conn->cp.pf(); + const rfb::PixelFormat& pf = cp.pf(); + rdr::U8* buf[64 * 64 * 4 * pf.bpp/8]; switch (pf.bpp) { case 8: zrleDecode8 (r, is, &zis, (rdr::U8*) buf, pf, pb); break; case 16: zrleDecode16(r, is, &zis, (rdr::U16*)buf, pf, pb); break; |