summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2015-02-02 16:25:34 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-02-16 08:48:00 +0100
commit0e7d6f608339029404efd025ae9b8965ffe60087 (patch)
tree6441fc70ba7f63e62ab8b3184c0b6f5125eb6a21 /ui
parentf7801c5ce42250bf1e84d21bceb1802cfe4485e8 (diff)
downloadqemu-0e7d6f608339029404efd025ae9b8965ffe60087.tar.gz
qemu-0e7d6f608339029404efd025ae9b8965ffe60087.tar.bz2
qemu-0e7d6f608339029404efd025ae9b8965ffe60087.zip
ui/vnc: optimize full scanline updates
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 <pl@kamp.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index faa218f84b..14289fd951 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);