From: Pierre Ossman Date: Tue, 10 Nov 2015 12:03:26 +0000 (+0100) Subject: Remove CMsgReader::getImageBuf() as nothing uses it X-Git-Tag: v1.6.90~95^2~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7bfb73b61210f5d38a8162a88730fb8bb5bfb33b;p=tigervnc.git Remove CMsgReader::getImageBuf() as nothing uses it --- diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx index 04846ef4..96ddf443 100644 --- a/common/rfb/CMsgReader.cxx +++ b/common/rfb/CMsgReader.cxx @@ -23,19 +23,17 @@ #include #include #include -#include using namespace rfb; CMsgReader::CMsgReader(CMsgHandler* handler_, rdr::InStream* is_) : imageBufIdealSize(0), handler(handler_), is(is_), - imageBuf(0), imageBufSize(0), nUpdateRectsLeft(0) + nUpdateRectsLeft(0) { } CMsgReader::~CMsgReader() { - delete [] imageBuf; } void CMsgReader::readServerInit() @@ -242,23 +240,3 @@ void CMsgReader::readExtendedDesktopSize(int x, int y, int w, int h) handler->setExtendedDesktopSize(x, y, w, h, layout); } - -rdr::U8* CMsgReader::getImageBuf(int required, int requested, int* nPixels) -{ - int requiredBytes = required * (handler->cp.pf().bpp / 8); - int requestedBytes = requested * (handler->cp.pf().bpp / 8); - int size = requestedBytes; - if (size > imageBufIdealSize) size = imageBufIdealSize; - - if (size < requiredBytes) - size = requiredBytes; - - if (imageBufSize < size) { - imageBufSize = size; - delete [] imageBuf; - imageBuf = new rdr::U8[imageBufSize]; - } - if (nPixels) - *nPixels = imageBufSize / (handler->cp.pf().bpp / 8); - return imageBuf; -} diff --git a/common/rfb/CMsgReader.h b/common/rfb/CMsgReader.h index 3592ef87..42c64965 100644 --- a/common/rfb/CMsgReader.h +++ b/common/rfb/CMsgReader.h @@ -46,7 +46,6 @@ namespace rfb { void readMsg(); rdr::InStream* getInStream() { return is; } - rdr::U8* getImageBuf(int required, int requested=0, int* nPixels=0); int imageBufIdealSize; @@ -67,8 +66,6 @@ namespace rfb { CMsgHandler* handler; rdr::InStream* is; - rdr::U8* imageBuf; - int imageBufSize; int nUpdateRectsLeft; }; }