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/TransImageGetter.cxx | |
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/TransImageGetter.cxx')
-rw-r--r-- | common/rfb/TransImageGetter.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/rfb/TransImageGetter.cxx b/common/rfb/TransImageGetter.cxx index bf26b44d..c1add1ce 100644 --- a/common/rfb/TransImageGetter.cxx +++ b/common/rfb/TransImageGetter.cxx @@ -56,12 +56,12 @@ void TransImageGetter::setColourMapEntries(int firstCol, int nCols) PixelTransformer::setColourMapEntries(firstCol, nCols); } -rdr::U8 *TransImageGetter::getRawPixelsRW(const Rect &r, int *stride) +const rdr::U8 *TransImageGetter::getRawPixelsR(const Rect &r, int *stride) { if (!offset.equals(Point(0, 0))) - return pb->getPixelsRW(r.translate(offset.negate()), stride); + return pb->getPixelsR(r.translate(offset.negate()), stride); else - return pb->getPixelsRW(r, stride); + return pb->getPixelsR(r, stride); } void TransImageGetter::getImage(void* outPtr, const Rect& r, int outStride) |