aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-11-12 13:07:42 +0100
committerPierre Ossman <ossman@cendio.se>2015-11-27 11:09:16 +0100
commit570cd5c478da3a8dfd2d7f728671f0171fd3893a (patch)
tree08cf85564be60fc27046e2177425a7e5c096e6e0 /common/rfb
parent504afa27c1128de9287599e67cf01bd06df06908 (diff)
downloadtigervnc-570cd5c478da3a8dfd2d7f728671f0171fd3893a.tar.gz
tigervnc-570cd5c478da3a8dfd2d7f728671f0171fd3893a.zip
Add flags member to decoders
Allows us to add attributes later that affect of the decoder manager deals with the decoders.
Diffstat (limited to 'common/rfb')
-rw-r--r--common/rfb/CopyRectDecoder.cxx2
-rw-r--r--common/rfb/Decoder.cxx2
-rw-r--r--common/rfb/Decoder.h11
-rw-r--r--common/rfb/HextileDecoder.cxx2
-rw-r--r--common/rfb/RREDecoder.cxx2
-rw-r--r--common/rfb/RawDecoder.cxx2
-rw-r--r--common/rfb/TightDecoder.cxx2
-rw-r--r--common/rfb/ZRLEDecoder.cxx2
8 files changed, 17 insertions, 8 deletions
diff --git a/common/rfb/CopyRectDecoder.cxx b/common/rfb/CopyRectDecoder.cxx
index 52de8790..32ed1b3b 100644
--- a/common/rfb/CopyRectDecoder.cxx
+++ b/common/rfb/CopyRectDecoder.cxx
@@ -22,7 +22,7 @@
using namespace rfb;
-CopyRectDecoder::CopyRectDecoder()
+CopyRectDecoder::CopyRectDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/Decoder.cxx b/common/rfb/Decoder.cxx
index a1f44389..f9bbffca 100644
--- a/common/rfb/Decoder.cxx
+++ b/common/rfb/Decoder.cxx
@@ -28,7 +28,7 @@
using namespace rfb;
-Decoder::Decoder()
+Decoder::Decoder(enum DecoderFlags flags) : flags(flags)
{
}
diff --git a/common/rfb/Decoder.h b/common/rfb/Decoder.h
index 7286b41d..95c14668 100644
--- a/common/rfb/Decoder.h
+++ b/common/rfb/Decoder.h
@@ -28,10 +28,16 @@ namespace rfb {
class ConnParams;
class ModifiablePixelBuffer;
class Rect;
+ class Region;
+
+ enum DecoderFlags {
+ // A constant for decoders that don't need anything special
+ DecoderPlain = 0,
+ };
class Decoder {
public:
- Decoder();
+ Decoder(enum DecoderFlags flags);
virtual ~Decoder();
// These functions are the main interface to an individual decoder
@@ -58,6 +64,9 @@ namespace rfb {
public:
static bool supported(int encoding);
static Decoder* createDecoder(int encoding);
+
+ public:
+ const enum DecoderFlags flags;
};
}
diff --git a/common/rfb/HextileDecoder.cxx b/common/rfb/HextileDecoder.cxx
index d1412d4a..eae00408 100644
--- a/common/rfb/HextileDecoder.cxx
+++ b/common/rfb/HextileDecoder.cxx
@@ -36,7 +36,7 @@ using namespace rfb;
#include <rfb/hextileDecode.h>
#undef BPP
-HextileDecoder::HextileDecoder()
+HextileDecoder::HextileDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/RREDecoder.cxx b/common/rfb/RREDecoder.cxx
index 2dd47cc0..218c9b0b 100644
--- a/common/rfb/RREDecoder.cxx
+++ b/common/rfb/RREDecoder.cxx
@@ -36,7 +36,7 @@ using namespace rfb;
#include <rfb/rreDecode.h>
#undef BPP
-RREDecoder::RREDecoder()
+RREDecoder::RREDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/RawDecoder.cxx b/common/rfb/RawDecoder.cxx
index e349bda8..786f1545 100644
--- a/common/rfb/RawDecoder.cxx
+++ b/common/rfb/RawDecoder.cxx
@@ -25,7 +25,7 @@
using namespace rfb;
-RawDecoder::RawDecoder()
+RawDecoder::RawDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index 1bfa7a9f..24236dba 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -46,7 +46,7 @@ static const int TIGHT_MIN_TO_COMPRESS = 12;
#include <rfb/tightDecode.h>
#undef BPP
-TightDecoder::TightDecoder()
+TightDecoder::TightDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/ZRLEDecoder.cxx b/common/rfb/ZRLEDecoder.cxx
index 498152cf..c9245c06 100644
--- a/common/rfb/ZRLEDecoder.cxx
+++ b/common/rfb/ZRLEDecoder.cxx
@@ -62,7 +62,7 @@ static inline rdr::U32 readOpaque24B(rdr::InStream* is)
#undef CPIXEL
#undef BPP
-ZRLEDecoder::ZRLEDecoder()
+ZRLEDecoder::ZRLEDecoder() : Decoder(DecoderPlain)
{
}