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/Encoder.h | |
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/Encoder.h')
-rw-r--r-- | common/rfb/Encoder.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/common/rfb/Encoder.h b/common/rfb/Encoder.h index 2897f9f8..aeeb5c34 100644 --- a/common/rfb/Encoder.h +++ b/common/rfb/Encoder.h @@ -21,11 +21,10 @@ #define __RFB_ENCODER_H__ #include <rfb/Rect.h> -#include <rfb/TransImageGetter.h> namespace rfb { class SConnection; - class TransImageGetter; + class PixelBuffer; class Encoder { public: @@ -38,9 +37,11 @@ namespace rfb { virtual int getNumRects(const Rect &r) { return 1; } // writeRect() is the main interface that encodes the given rectangle - // with data from the ImageGetter onto the SMsgWriter given at - // encoder creation. - virtual void writeRect(const Rect& r, TransImageGetter* ig)=0; + // with data from the PixelBuffer onto the SConnection given at + // encoder creation. The PixelFormat of the PixelBuffer might not + // match the ConnParams and it is up ot the encoder to do + // any necessary conversion. + virtual void writeRect(const Rect& r, PixelBuffer* pb)=0; static bool supported(int encoding); static Encoder* createEncoder(int encoding, SConnection* conn); |