diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-07-09 16:44:11 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-14 16:03:41 +0200 |
commit | 0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8 (patch) | |
tree | 500f61ee230d30fa1f8e955214c698e86b69e2f4 /vncviewer/CConn.cxx | |
parent | 126e56420e47d72cc950d03976ee57d1efda436e (diff) | |
download | tigervnc-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 'vncviewer/CConn.cxx')
-rw-r--r-- | vncviewer/CConn.cxx | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index c78bb891..305eddce 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -263,7 +263,6 @@ void CConn::serverInit() // This initial update request is a bit of a corner case, so we need // to help out setting the correct format here. assert(pendingPFChange); - desktop->setServerPF(pendingPF); cp.setPF(pendingPF); pendingPFChange = false; } @@ -330,7 +329,6 @@ void CConn::framebufferUpdateEnd() // A format change has been scheduled and we are now past the update // with the old format. Time to active the new one. if (pendingPFChange) { - desktop->setServerPF(pendingPF); cp.setPF(pendingPF); pendingPFChange = false; } @@ -405,26 +403,11 @@ void CConn::dataRect(const Rect& r, int encoding) throw Exception("Unknown rect encoding"); } } - decoders[encoding]->readRect(r, this); + decoders[encoding]->readRect(r, desktop->getFramebuffer()); sock->inStream().stopTiming(); } -void CConn::fillRect(const rfb::Rect& r, rfb::Pixel p) -{ - desktop->fillRect(r,p); -} - -void CConn::imageRect(const rfb::Rect& r, void* p) -{ - desktop->imageRect(r,p); -} - -void CConn::copyRect(const rfb::Rect& r, int sx, int sy) -{ - desktop->copyRect(r,sx,sy); -} - void CConn::setCursor(int width, int height, const Point& hotspot, void* data, void* mask) { @@ -461,18 +444,10 @@ void CConn::fence(rdr::U32 flags, unsigned len, const char data[]) pf.read(&memStream); - desktop->setServerPF(pf); cp.setPF(pf); } } -rdr::U8* CConn::getRawBufferRW(const rfb::Rect& r, int* stride) { - return desktop->getBufferRW(r, stride); -} -void CConn::releaseRawBuffer(const rfb::Rect& r) { - desktop->commitBufferRW(r); -} - ////////////////////// Internal methods ////////////////////// |