]> source.dussan.org Git - tigervnc.git/commitdiff
Fixed a problem with low performance in new polling code.
authorConstantin Kaplinsky <const@tightvnc.com>
Mon, 8 Oct 2007 14:16:02 +0000 (14:16 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Mon, 8 Oct 2007 14:16:02 +0000 (14:16 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2347 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/x0vncserver/PollingManager.cxx

index 9921fd0e51e06ef1f42b345efdaaf2aa3969ce9c..d251f5fa7d073bb0b349d7b5212aef245866ce42 100644 (file)
@@ -274,7 +274,11 @@ int PollingManager::checkRow(int x, int y, int w, bool *pmxChanged)
   int bytesPerPixel = m_image->xim->bits_per_pixel / 8;
   int bytesPerLine = m_image->xim->bytes_per_line;
 
-  getRow(x, y, w);
+  if (x == 0 && w == m_width) {
+    getFullRow(y);              // use more efficient method if possible
+  } else {
+    getRow(x, y, w);
+  }
 
   char *ptr_old = m_image->xim->data + y * bytesPerLine + x * bytesPerPixel;
   char *ptr_new = m_rowImage->xim->data;