diff options
Diffstat (limited to 'common/rfb/CopyRectDecoder.cxx')
-rw-r--r-- | common/rfb/CopyRectDecoder.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/common/rfb/CopyRectDecoder.cxx b/common/rfb/CopyRectDecoder.cxx index a7383881..efc77c99 100644 --- a/common/rfb/CopyRectDecoder.cxx +++ b/common/rfb/CopyRectDecoder.cxx @@ -20,10 +20,12 @@ #include <config.h> #endif +#include <core/Region.h> + #include <rdr/MemInStream.h> #include <rdr/OutStream.h> + #include <rfb/PixelBuffer.h> -#include <rfb/Region.h> #include <rfb/CopyRectDecoder.h> using namespace rfb; @@ -36,7 +38,7 @@ CopyRectDecoder::~CopyRectDecoder() { } -bool CopyRectDecoder::readRect(const Rect& /*r*/, +bool CopyRectDecoder::readRect(const core::Rect& /*r*/, rdr::InStream* is, const ServerParams& /*server*/, rdr::OutStream* os) @@ -48,11 +50,11 @@ bool CopyRectDecoder::readRect(const Rect& /*r*/, } -void CopyRectDecoder::getAffectedRegion(const Rect& rect, +void CopyRectDecoder::getAffectedRegion(const core::Rect& rect, const uint8_t* buffer, size_t buflen, const ServerParams& server, - Region* region) + core::Region* region) { rdr::MemInStream is(buffer, buflen); int srcX = is.readU16(); @@ -60,11 +62,12 @@ void CopyRectDecoder::getAffectedRegion(const Rect& rect, Decoder::getAffectedRegion(rect, buffer, buflen, server, region); - region->assign_union(Region(rect.translate(Point(srcX-rect.tl.x, - srcY-rect.tl.y)))); + region->assign_union(rect.translate({srcX-rect.tl.x, + srcY-rect.tl.y})); } -void CopyRectDecoder::decodeRect(const Rect& r, const uint8_t* buffer, +void CopyRectDecoder::decodeRect(const core::Rect& r, + const uint8_t* buffer, size_t buflen, const ServerParams& /*server*/, ModifiablePixelBuffer* pb) @@ -72,5 +75,5 @@ void CopyRectDecoder::decodeRect(const Rect& r, const uint8_t* buffer, rdr::MemInStream is(buffer, buflen); int srcX = is.readU16(); int srcY = is.readU16(); - pb->copyRect(r, Point(r.tl.x-srcX, r.tl.y-srcY)); + pb->copyRect(r, {r.tl.x-srcX, r.tl.y-srcY}); } |