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.
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index bfc3352..5f4142b 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -19,7 +19,7 @@
*/
#include <rfb/CMsgReader.h>
#include <rfb/CConnection.h>
-#include <rfb/CMsgHandler.h>
+#include <rfb/PixelBuffer.h>
#include <rfb/TightDecoder.h>
using namespace rfb;
@@ -44,12 +44,12 @@
{
}
-void TightDecoder::readRect(const Rect& r, CMsgHandler* handler)
+void TightDecoder::readRect(const Rect& r, ModifiablePixelBuffer* pb)
{
is = conn->getInStream();
- this->handler = handler;
- clientpf = handler->getPreferredPF();
- serverpf = handler->cp.pf();
+ this->pb = pb;
+ clientpf = pb->getPF();
+ serverpf = conn->cp.pf();
if (clientpf.equal(serverpf)) {
/* Decode directly into the framebuffer (fast path) */