diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-01-20 15:05:21 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-07 14:50:11 +0200 |
commit | b6b4dc6487690e891ec2487c6cf765d36821fe3a (patch) | |
tree | 77d2e0f49461c7ff8fc78872c9763fe9b6f67adb /common/rfb/TightEncoder.cxx | |
parent | bcc295e5a60954ff39b011d6a2cbdf052a0efafc (diff) | |
download | tigervnc-b6b4dc6487690e891ec2487c6cf765d36821fe3a.tar.gz tigervnc-b6b4dc6487690e891ec2487c6cf765d36821fe3a.zip |
Remove full support for colour maps
Gets rid of a loooot of code and complexity.
Colour map clients are still supported through an
automatically generated map, but we lose the ability to
develop a client or server that uses colour maps
internally.
Diffstat (limited to 'common/rfb/TightEncoder.cxx')
-rw-r--r-- | common/rfb/TightEncoder.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/rfb/TightEncoder.cxx b/common/rfb/TightEncoder.cxx index b94b53e3..800d3316 100644 --- a/common/rfb/TightEncoder.cxx +++ b/common/rfb/TightEncoder.cxx @@ -338,9 +338,9 @@ void TightEncoder::writeRect(const Rect& _r, TransImageGetter* _ig) if (checkSolidTile(sr, &colorValue, false)) { if (jpegSubsampling == subsampleGray && jpegQuality != -1) { - Colour rgb; - serverpf.rgbFromPixel(colorValue, NULL, &rgb); - rdr::U32 lum = ((257 * rgb.r) + (504 * rgb.g) + (98 * rgb.b) + rdr::U16 r, g, b; + serverpf.rgbFromPixel(colorValue, &r, &g, &b); + rdr::U32 lum = ((257 * r) + (504 * g) + (98 * b) + 16500) / 1000; colorValue = lum + (lum << 8) + (lum << 16); } |