Allow perceptually lossless refresh
Loosen the definition of "lossless" a bit so that we can use high
quality JPEG to refresh damaged parts of the screen. Although this
isn't bit perfect, it is close enough that most users will not be
able to tell the difference.
Level 9 is used rather than level 8 because some monitors have
exaggerated contrast that allows the artefacts from level 8 to be
noticeable.
diff --git a/common/rfb/Encoder.cxx b/common/rfb/Encoder.cxx
index 18b6680..0e29f1d 100644
--- a/common/rfb/Encoder.cxx
+++ b/common/rfb/Encoder.cxx
@@ -24,9 +24,11 @@
using namespace rfb;
Encoder::Encoder(SConnection *conn_, int encoding_,
- enum EncoderFlags flags_, unsigned int maxPaletteSize_) :
+ enum EncoderFlags flags_,
+ unsigned int maxPaletteSize_, int losslessQuality_) :
encoding(encoding_), flags(flags_),
- maxPaletteSize(maxPaletteSize_), conn(conn_)
+ maxPaletteSize(maxPaletteSize_), losslessQuality(losslessQuality_),
+ conn(conn_)
{
}