If the client and server are using identical pixel formats, then perform Tight decoding directly into the viewer's back buffer, rather than going through the slow fillRect/imageRect routines.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4757 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h
index 144ad42..c66c19a 100644
--- a/vncviewer/Viewport.h
+++ b/vncviewer/Viewport.h
@@ -97,6 +97,16 @@
     damageRect(r);
   }
 
+  rdr::U8* getPixelsRW(const rfb::Rect& r, int* stride) {
+    return frameBuffer->getPixelsRW(r, stride);
+  }
+
+  void damageRect(const rfb::Rect& r) {
+    damage.assign_union(rfb::Region(r));
+    if (!Fl::has_timeout(handleUpdateTimeout, this))
+      Fl::add_timeout(0.500, handleUpdateTimeout, this);
+  };
+
   void setCursor(int width, int height, const rfb::Point& hotspot,
                  void* data, void* mask);
 
@@ -110,12 +120,6 @@
 
 private:
 
-  void damageRect(const rfb::Rect& r) {
-    damage.assign_union(rfb::Region(r));
-    if (!Fl::has_timeout(handleUpdateTimeout, this))
-      Fl::add_timeout(0.500, handleUpdateTimeout, this);
-  };
-
   static void handleUpdateTimeout(void *data);
 
   void commitColourMap();