aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/PixelFormat.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-01-29 17:00:36 +0100
committerPierre Ossman <ossman@cendio.se>2014-07-09 14:55:08 +0200
commit761fe24089bfe95028b0da02a12650351b244165 (patch)
treedea109c9ba03b6bc967dec0043316bae2055e4ed /common/rfb/PixelFormat.h
parent2fe68da9e3e7a68102e144464ebcd09f226a446c (diff)
downloadtigervnc-761fe24089bfe95028b0da02a12650351b244165.tar.gz
tigervnc-761fe24089bfe95028b0da02a12650351b244165.zip
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.
Diffstat (limited to 'common/rfb/PixelFormat.h')
-rw-r--r--common/rfb/PixelFormat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/rfb/PixelFormat.h b/common/rfb/PixelFormat.h
index db129883..b18045f7 100644
--- a/common/rfb/PixelFormat.h
+++ b/common/rfb/PixelFormat.h
@@ -75,6 +75,14 @@ namespace rfb {
void rgbFromBuffer(rdr::U8* dst, const rdr::U8* src,
int w, int stride, int h) const;
+ Pixel pixelFromPixel(const PixelFormat &srcPF, Pixel src) const;
+
+ void bufferFromBuffer(rdr::U8* dst, const PixelFormat &srcPF,
+ const rdr::U8* src, int pixels) const;
+ void bufferFromBuffer(rdr::U8* dst, const PixelFormat &srcPF,
+ const rdr::U8* src, int w, int h,
+ int dstStride, int srcStride) const;
+
void print(char* str, int len) const;
bool parse(const char* str);