git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4752 3789f03b-4d11-0410-bbf8-ca57d06f2519tags/v1.1.90
@@ -30,12 +30,13 @@ namespace rfb { | |||
class ColourMap { | |||
public: | |||
virtual void lookup(int index, int* r, int* g, int* b)=0; | |||
virtual ~ColourMap() {} | |||
}; | |||
class SimpleColourMap : public ColourMap { | |||
public: | |||
SimpleColourMap(int size = 256) { table = new Colour[size]; }; | |||
~SimpleColourMap() { delete [] table; }; | |||
virtual ~SimpleColourMap() { delete [] table; }; | |||
void lookup(int index, int* r, int* g, int* b) | |||
{ *r = table[index].r; *g = table[index].g; *b = table[index].b; }; |
@@ -25,6 +25,7 @@ namespace rfb { | |||
public: | |||
virtual void getImage(void* imageBuf, | |||
const Rect& r, int stride=0) = 0; | |||
virtual ~ImageGetter() {} | |||
}; | |||
} | |||
#endif |
@@ -299,8 +299,6 @@ void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, int pixels, Co | |||
void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, | |||
int w, int pitch, int h, ColourMap* cm) const | |||
{ | |||
rdr::U8 *rowptr, *colptr; | |||
if (is888()) { | |||
// Optimised common case | |||
int rindex, gindex, bindex; |
@@ -317,7 +317,6 @@ bool TightEncoder::writeRect(const Rect& _r, TransImageGetter* _ig, | |||
Rect sr, bestr; | |||
int dx, dy, dw, dh; | |||
rdr::U32 colorValue; | |||
int maxRectSize = pconf->maxRectSize; | |||
int maxRectWidth = pconf->maxRectWidth; | |||
int nMaxWidth = (w > maxRectWidth) ? maxRectWidth : w; | |||
int nMaxRows = pconf->maxRectSize / nMaxWidth; |