qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 6/7] ui/vnc: optimize full scanline updates


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 6/7] ui/vnc: optimize full scanline updates
Date: Mon, 16 Feb 2015 09:26:04 +0100

From: Peter Lieven <address@hidden>

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 <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 ui/vnc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ui/vnc.c b/ui/vnc.c
index faa218f..14289fd 100644
--- 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);
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]