From 6eed761f1505348596f34c915c56e8a98ce7c3af Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann 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 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 RH-Acked-by: Marc-André Lureau RH-Acked-by: Laurent Vivier From: Peter Lieven this allows for setting VNC_DIRTY_PIXELS_PER_BIT to different values than 16 if desired. Reviewed-by: Wenchao Xia Signed-off-by: Peter Lieven Signed-off-by: Gerd Hoffmann (cherry picked from commit 6cd859aa8a7fb60fe6edb89e628cddfe25dfe186) Signed-off-by: Miroslav Rezanina --- 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