Patchwork [PATCHv3,2/6] ui/vnc: derive cmp_bytes from VNC_DIRTY_PIXELS_PER_BIT

login
register
mail settings
Submitter Peter Lieven
Date Jan. 5, 2014, 6:02 p.m.
Message ID <1388944951-14767-3-git-send-email-pl@kamp.de>
Download mbox | patch
Permalink /patch/307008/
State New
Headers show

Comments

Peter Lieven - Jan. 5, 2014, 6:02 p.m.
this allows for setting VNC_DIRTY_PIXELS_PER_BIT to different
values than 16 if desired.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 ui/vnc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Wayne Xia - Jan. 6, 2014, 7:03 a.m.
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index 1ca6021..1d2aa1a 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2697,7 +2697,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);
     }