diff options
author | Pierre Ossman <ossman@cendio.se> | 2012-01-30 13:58:44 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2012-01-30 13:58:44 +0000 |
commit | 311a2b47cb39567953dad8170b63f3bb4eb7639e (patch) | |
tree | 1abe5ee007ec2791fda7d7fd400e82b3c5d41310 /common/rfb/TightEncoder.h | |
parent | 654e3f906c7e1467f4ec7af06382aa1f4662964a (diff) | |
download | tigervnc-311a2b47cb39567953dad8170b63f3bb4eb7639e.tar.gz tigervnc-311a2b47cb39567953dad8170b63f3bb4eb7639e.zip |
The Tight encoder uses the pixel buffer as a scratch pad, which doesn't
work so well with the new optimisation to feed it the raw frame buffer.
Reorganise and clean up the code to handle this, and make the raw frame
buffer pointer const so that we might avoid such bugs in the future.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4841 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/TightEncoder.h')
-rw-r--r-- | common/rfb/TightEncoder.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/common/rfb/TightEncoder.h b/common/rfb/TightEncoder.h index 95c2b984..10ca7616 100644 --- a/common/rfb/TightEncoder.h +++ b/common/rfb/TightEncoder.h @@ -100,9 +100,9 @@ namespace rfb { int paletteInsert(rdr::U32 rgb, int numPixels, int bpp); void paletteReset(void); - void fastFillPalette8(rdr::U8 *data, int stride, const Rect &r); - void fastFillPalette16(rdr::U16 *data, int stride, const Rect &r); - void fastFillPalette32(rdr::U32 *data, int stride, const Rect &r); + void fastFillPalette8(const rdr::U8 *buffer, int stride, const Rect &r); + void fastFillPalette16(const rdr::U8 *buffer, int stride, const Rect &r); + void fastFillPalette32(const rdr::U8 *buffer, int stride, const Rect &r); void fillPalette8(rdr::U8 *data, int count); void fillPalette16(rdr::U16 *data, int count); @@ -135,10 +135,7 @@ namespace rfb { void encodeIndexedRect16(rdr::U16 *buf, const Rect& r, rdr::OutStream *os); void encodeIndexedRect32(rdr::U32 *buf, const Rect& r, rdr::OutStream *os); - void encodeJpegRect16(rdr::U16 *buf, int stride, const Rect& r, - rdr::OutStream *os); - void encodeJpegRect32(rdr::U32 *buf, int stride, const Rect& r, - rdr::OutStream *os); + void encodeJpegRect(const Rect& r, rdr::OutStream *os); SMsgWriter* writer; rdr::MemOutStream mos; |