Add ability to directly convert between two pixel formats
This is a lot easier and cheaper than having to set up a complete
PixelTransformer object.
diff --git a/tests/pixelconv.cxx b/tests/pixelconv.cxx
index 92011d3..a30ed90 100644
--- a/tests/pixelconv.cxx
+++ b/tests/pixelconv.cxx
@@ -42,6 +42,12 @@
dst, fbsize, rfb::Point(0, 0));
}
+static void testBuffer(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
+ rdr::U8 *dst, rdr::U8 *src)
+{
+ dstpf.bufferFromBuffer(dst, srcpf, src, tile, tile, fbsize, fbsize);
+}
+
static void testToRGB(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
rdr::U8 *dst, rdr::U8 *src)
{
@@ -86,6 +92,7 @@
struct TestEntry tests[] = {
{"memcpy", testMemcpy},
{"PixelTransformer", testPixelTransformer},
+ {"bufferFromBuffer", testBuffer},
{"rgbFromBuffer", testToRGB},
{"bufferFromRGB", testFromRGB},
};