summaryrefslogtreecommitdiffstats
path: root/common/rfb/tightDecode.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/tightDecode.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/tightDecode.h')
-rw-r--r--common/rfb/tightDecode.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/rfb/tightDecode.h b/common/rfb/tightDecode.h
index a5963119..53dbba7e 100644
--- a/common/rfb/tightDecode.h
+++ b/common/rfb/tightDecode.h
@@ -77,7 +77,7 @@ void TIGHT_DECODE (const Rect& r)
} else {
pix = is->READ_PIXEL();
}
- handler->fillRect(r, pix);
+ pb->fillRect(serverpf, r, pix);
return;
}
@@ -153,7 +153,7 @@ void TIGHT_DECODE (const Rect& r)
PIXEL_T *buf;
int stride = r.width();
- if (directDecode) buf = (PIXEL_T *)handler->getRawBufferRW(r, &stride);
+ if (directDecode) buf = (PIXEL_T *)pb->getBufferRW(r, &stride);
else buf = (PIXEL_T *)conn->reader()->getImageBuf(r.area());
if (palSize == 0) {
@@ -225,8 +225,8 @@ void TIGHT_DECODE (const Rect& r)
}
}
- if (directDecode) handler->releaseRawBuffer(r);
- else handler->imageRect(r, buf);
+ if (directDecode) pb->commitBufferRW(r);
+ else pb->imageRect(serverpf, r, buf);
delete [] netbuf;
@@ -253,9 +253,9 @@ DECOMPRESS_JPEG_RECT(const Rect& r)
// We always use direct decoding with JPEG images
int stride;
- rdr::U8 *buf = handler->getRawBufferRW(r, &stride);
+ rdr::U8 *buf = pb->getBufferRW(r, &stride);
jd.decompress(netbuf, compressedLen, buf, stride, r, clientpf);
- handler->releaseRawBuffer(r);
+ pb->commitBufferRW(r);
delete [] netbuf;
}