diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-07-09 16:44:11 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-14 16:03:41 +0200 |
commit | 0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8 (patch) | |
tree | 500f61ee230d30fa1f8e955214c698e86b69e2f4 /common/rfb/CopyRectDecoder.cxx | |
parent | 126e56420e47d72cc950d03976ee57d1efda436e (diff) | |
download | tigervnc-0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8.tar.gz tigervnc-0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8.zip |
Use PixelBuffer objects as the interface for encoders and decoders
This avoid a lot of unnecessary middle men. This also pushes the
responsibility for pixel format conversion into the encoders and
decoders. The new bufferFromBuffer() is used for direct conversion,
rather than PixelTransformer/TransImageGetter.
Diffstat (limited to 'common/rfb/CopyRectDecoder.cxx')
-rw-r--r-- | common/rfb/CopyRectDecoder.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/rfb/CopyRectDecoder.cxx b/common/rfb/CopyRectDecoder.cxx index bb3084fd..4b104189 100644 --- a/common/rfb/CopyRectDecoder.cxx +++ b/common/rfb/CopyRectDecoder.cxx @@ -17,7 +17,6 @@ */ #include <rdr/InStream.h> #include <rfb/CConnection.h> -#include <rfb/CMsgHandler.h> #include <rfb/PixelBuffer.h> #include <rfb/CopyRectDecoder.h> @@ -31,9 +30,9 @@ CopyRectDecoder::~CopyRectDecoder() { } -void CopyRectDecoder::readRect(const Rect& r, CMsgHandler* handler) +void CopyRectDecoder::readRect(const Rect& r, ModifiablePixelBuffer* pb) { int srcX = conn->getInStream()->readU16(); int srcY = conn->getInStream()->readU16(); - handler->copyRect(r, srcX, srcY); + pb->copyRect(r, Point(r.tl.x-srcX, r.tl.y-srcY)); } |