Special handling of a rectangular video area in the UpdateTracker and derived/related classes.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2327 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/ComparingUpdateTracker.cxx b/common/rfb/ComparingUpdateTracker.cxx
index ce3d68a..ec32302 100644
--- a/common/rfb/ComparingUpdateTracker.cxx
+++ b/common/rfb/ComparingUpdateTracker.cxx
@@ -38,6 +38,14 @@
 
 void ComparingUpdateTracker::compare()
 {
+  // First of all, exclude video area from both changed and copied regions.
+  // We handle video area separately and do not compare it -- we know it's
+  // being changed continuously.
+  if (!video_area.is_empty()) {
+    changed.assign_subtract(video_area);
+    copied.assign_subtract(video_area);
+  }
+
   std::vector<Rect> rects;
   std::vector<Rect>::iterator i;