Further optimizations to the Tight encoder to eliminate getImage() overhead. The encoder now directly accesses the framebuffer for solid rectangle computation, JPEG encoding, and color counting (if pixel translation is not required.) Also moved everything in tightEncode.h into the TightEncoder class to eliminate all of the static mess (this will be important later on if we decide to multi-thread the encoder.)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4631 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/PixelBuffer.h b/common/rfb/PixelBuffer.h
index 4a13923..fc35a7d 100644
--- a/common/rfb/PixelBuffer.h
+++ b/common/rfb/PixelBuffer.h
@@ -68,6 +68,7 @@
// The pointer is to the top-left pixel of the specified Rect.
// The buffer stride (in pixels) is returned.
virtual const rdr::U8* getPixelsR(const Rect& r, int* stride) = 0;
+ virtual rdr::U8* getPixelsRW(const Rect& r, int* stride) = 0;
// Get pixel data for a given part of the buffer
// Data is copied into the supplied buffer, with the specified
@@ -107,7 +108,7 @@
virtual int getStride() const;
// Get a pointer to specified pixel data
- virtual rdr::U8* getPixelsRW(const Rect& r, int* stride);
+ rdr::U8* getPixelsRW(const Rect& r, int* stride);
virtual const rdr::U8* getPixelsR(const Rect& r, int* stride) {
return getPixelsRW(r, stride);
}