Try to render entire update in one go to avoid tearing.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3718 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/vncviewer/DesktopWindow.h b/win/vncviewer/DesktopWindow.h
index 259b6b0..4bc7b7a 100644
--- a/win/vncviewer/DesktopWindow.h
+++ b/win/vncviewer/DesktopWindow.h
@@ -119,6 +119,9 @@
       // - Set the local clipboard
       void serverCutText(const char* str, rdr::U32 len);
 
+      // - Completion of one FramebufferUpdate
+      void framebufferUpdateEnd();
+
       // - Draw into the desktop buffer & update the window
       void fillRect(const Rect& r, Pixel pix);
       void imageRect(const Rect& r, void* pixels);
@@ -197,6 +200,9 @@
       Point bumpScrollDelta;
       IntervalTimer bumpScrollTimer;
 
+      // Track modified areas of the framebuffer
+      void updateWindow();
+
       // Locally-rendered VNC cursor
       void hideLocalCursor();
       void showLocalCursor();
@@ -235,6 +241,10 @@
       bool fullscreenActive;
       bool fullscreenRestore;
 
+      // Damage tracking
+      rfb::Region damage;
+      IntervalTimer updateTimer;
+
       // Cursor handling
       Cursor cursor;
       bool systemCursorVisible;  // Should system-cursor be drawn?