ui/vnc: optimize full scanline updates
PATCH 1/1 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 <[email protected]>
--- ui/vnc.c | 6 ++++++ 1 file changed, 6 insertions(+)
ui/vnc.c +6 -0
@@ -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);
Signature · 1 line
1.9.1
Quoted 3 lines · Peter Lieven
in case we send and update for a complete scanline increment the y offset to avoid running to
find_next_bitfor that lines twice.
Added to vnc patch queue.
thanks,
Gerd