aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/Decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/Decoder.h')
-rw-r--r--common/rfb/Decoder.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/common/rfb/Decoder.h b/common/rfb/Decoder.h
index 77987737..17d5296b 100644
--- a/common/rfb/Decoder.h
+++ b/common/rfb/Decoder.h
@@ -19,19 +19,23 @@
#ifndef __RFB_DECODER_H__
#define __RFB_DECODER_H__
+#include <stddef.h>
#include <stdint.h>
+namespace core {
+ class Region;
+ struct Rect;
+}
+
namespace rdr {
class InStream;
class OutStream;
}
namespace rfb {
+
class ServerParams;
class ModifiablePixelBuffer;
- class Region;
-
- struct Rect;
enum DecoderFlags {
// A constant for decoders that don't need anything special
@@ -54,7 +58,7 @@ namespace rfb {
// InStream to the OutStream, possibly changing it along the way to
// make it easier to decode. This function will always be called in
// a serial manner on the main thread.
- virtual bool readRect(const Rect& r, rdr::InStream* is,
+ virtual bool readRect(const core::Rect& r, rdr::InStream* is,
const ServerParams& server, rdr::OutStream* os)=0;
// These functions will be called from any of the worker threads.
@@ -64,17 +68,17 @@ namespace rfb {
// getAffectedRegion() returns the parts of the frame buffer will
// be either read from or written do when decoding this rect. The
// default implementation simply returns the given rectangle.
- virtual void getAffectedRegion(const Rect& rect, const uint8_t* buffer,
+ virtual void getAffectedRegion(const core::Rect& rect, const uint8_t* buffer,
size_t buflen, const ServerParams& server,
- Region* region);
+ core::Region* region);
// doesRectsConflict() determines if two rectangles must be decoded
// in the order they were received. This will only be called if the
// DecoderPartiallyOrdered flag has been set.
- virtual bool doRectsConflict(const Rect& rectA,
+ virtual bool doRectsConflict(const core::Rect& rectA,
const uint8_t* bufferA,
size_t buflenA,
- const Rect& rectB,
+ const core::Rect& rectB,
const uint8_t* bufferB,
size_t buflenB,
const ServerParams& server);
@@ -83,7 +87,7 @@ namespace rfb {
// given buffer, onto the ModifiablePixelBuffer. The PixelFormat of
// the PixelBuffer might not match the ConnParams and it is up to
// the decoder to do any necessary conversion.
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
+ virtual void decodeRect(const core::Rect& r, const uint8_t* buffer,
size_t buflen, const ServerParams& server,
ModifiablePixelBuffer* pb)=0;
@@ -94,6 +98,7 @@ namespace rfb {
public:
const enum DecoderFlags flags;
};
+
}
#endif