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/hextileDecode.h b/common/rfb/hextileDecode.h
index 518a606..56ba118 100644
--- a/common/rfb/hextileDecode.h
+++ b/common/rfb/hextileDecode.h
@@ -38,7 +38,7 @@
#define HEXTILE_DECODE CONCAT2E(hextileDecode,BPP)
void HEXTILE_DECODE (const Rect& r, rdr::InStream* is, PIXEL_T* buf,
- CMsgHandler* handler)
+ const PixelFormat& pf, ModifiablePixelBuffer* pb)
{
Rect t;
PIXEL_T bg = 0;
@@ -56,7 +56,7 @@
if (tileType & hextileRaw) {
is->readBytes(buf, t.area() * (BPP/8));
- handler->imageRect(t, buf);
+ pb->imageRect(pf, t, buf);
continue;
}
@@ -94,7 +94,7 @@
}
}
}
- handler->imageRect(t, buf);
+ pb->imageRect(pf, t, buf);
}
}
}