]> Git Repo - qemu.git/commitdiff
ui/vnc: optimize full scanline updates
authorPeter Lieven <[email protected]>
Mon, 2 Feb 2015 15:25:34 +0000 (16:25 +0100)
committerGerd Hoffmann <[email protected]>
Mon, 16 Feb 2015 07:48:00 +0000 (08:48 +0100)
in case we send and update for a complete scanline increment
the y offset to avoid running to find_next_bit for that lines
twice.

Signed-off-by: Peter Lieven <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/vnc.c

index faa218f84b716a65311205ffa215e17648e11c39..14289fd9519295f8d8138895c36305d0faac07ac 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1111,6 +1111,12 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync)
                 n += vnc_job_add_rect(job, x * VNC_DIRTY_PIXELS_PER_BIT, y,
                                       (x2 - x) * VNC_DIRTY_PIXELS_PER_BIT, h);
             }
+            if (!x && x2 == width / VNC_DIRTY_PIXELS_PER_BIT) {
+                y += h;
+                if (y == height) {
+                    break;
+                }
+            }
         }
 
         vnc_job_push(job);
This page took 0.02735 seconds and 4 git commands to generate.