aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/hextileEncodeBetter.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-07-09 16:44:11 +0200
committerPierre Ossman <ossman@cendio.se>2014-07-14 16:03:41 +0200
commit0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8 (patch)
tree500f61ee230d30fa1f8e955214c698e86b69e2f4 /common/rfb/hextileEncodeBetter.h
parent126e56420e47d72cc950d03976ee57d1efda436e (diff)
downloadtigervnc-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/hextileEncodeBetter.h')
-rw-r--r--common/rfb/hextileEncodeBetter.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/rfb/hextileEncodeBetter.h b/common/rfb/hextileEncodeBetter.h
index 3a96ab63..efb2d9ca 100644
--- a/common/rfb/hextileEncodeBetter.h
+++ b/common/rfb/hextileEncodeBetter.h
@@ -275,7 +275,8 @@ void HEXTILE_TILE::encode(rdr::U8 *dst) const
// Main encoding function.
//
-void HEXTILE_ENCODE(const Rect& r, rdr::OutStream* os, TransImageGetter *ig)
+void HEXTILE_ENCODE(const Rect& r, rdr::OutStream* os,
+ const PixelFormat& pf, PixelBuffer* pb)
{
Rect t;
PIXEL_T buf[256];
@@ -294,7 +295,7 @@ void HEXTILE_ENCODE(const Rect& r, rdr::OutStream* os, TransImageGetter *ig)
t.br.x = __rfbmin(r.br.x, t.tl.x + 16);
- ig->getImage(buf, t);
+ pb->getImage(pf, buf, t);
tile.newTile(buf, t.width(), t.height());
int tileType = tile.getFlags();