Blob Blame History Raw
From 6eed761f1505348596f34c915c56e8a98ce7c3af Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Wed, 22 Feb 2017 12:36:20 +0100
Subject: [PATCH 02/24] ui/vnc: derive cmp_bytes from VNC_DIRTY_PIXELS_PER_BIT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <1487766986-6329-3-git-send-email-kraxel@redhat.com>
Patchwork-id: 73973
O-Subject: [RHEL-7.4 qemu-kvm PATCH 2/8] ui/vnc: derive cmp_bytes from VNC_DIRTY_PIXELS_PER_BIT
Bugzilla: 1377977
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Marc-André Lureau <mlureau@redhat.com>
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>

From: Peter Lieven <pl@kamp.de>

this allows for setting VNC_DIRTY_PIXELS_PER_BIT to different
values than 16 if desired.

Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 6cd859aa8a7fb60fe6edb89e628cddfe25dfe186)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 ui/vnc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 0c799ed..13fb34b 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2709,7 +2709,7 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
      * Check and copy modified bits from guest to server surface.
      * Update server dirty map.
      */
-    cmp_bytes = 64;
+    cmp_bytes = VNC_DIRTY_PIXELS_PER_BIT * VNC_SERVER_FB_BYTES;
     if (cmp_bytes > vnc_server_fb_stride(vd)) {
         cmp_bytes = vnc_server_fb_stride(vd);
     }
-- 
1.8.3.1