qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ui/vnc: optimize full scanline updates
@ 2015-02-02 15:25 Peter Lieven
  2015-02-10 10:20 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Lieven @ 2015-02-02 15:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Lieven, kraxel

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>
---
 ui/vnc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ui/vnc.c b/ui/vnc.c
index a742c90..6fa2ee7 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1115,6 +1115,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.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] ui/vnc: optimize full scanline updates
  2015-02-02 15:25 [Qemu-devel] [PATCH] ui/vnc: optimize full scanline updates Peter Lieven
@ 2015-02-10 10:20 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2015-02-10 10:20 UTC (permalink / raw)
  To: Peter Lieven; +Cc: qemu-devel

On Mo, 2015-02-02 at 16:25 +0100, Peter Lieven wrote:
> 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.

Added to vnc patch queue.

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-10 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02 15:25 [Qemu-devel] [PATCH] ui/vnc: optimize full scanline updates Peter Lieven
2015-02-10 10:20 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).