mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
vnc: return the number of rectangles
Some encodings like tight supports tiling (spliting in multiple sub-rectangles). So we needed a way to tell vnc_update_client() how much rectangles are in the buffer. zlib, raw and hextile always send a full rectangle. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
161c4f20bf
commit
a885211eed
4 changed files with 26 additions and 16 deletions
|
@ -116,7 +116,7 @@ static int vnc_zlib_stop(VncState *vs)
|
|||
return zstream->total_out - previous_out;
|
||||
}
|
||||
|
||||
void vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h)
|
||||
int vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h)
|
||||
{
|
||||
int old_offset, new_offset, bytes_written;
|
||||
|
||||
|
@ -132,13 +132,15 @@ void vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h)
|
|||
bytes_written = vnc_zlib_stop(vs);
|
||||
|
||||
if (bytes_written == -1)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
// hack in the size
|
||||
new_offset = vs->output.offset;
|
||||
vs->output.offset = old_offset;
|
||||
vnc_write_u32(vs, bytes_written);
|
||||
vs->output.offset = new_offset;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void vnc_zlib_clear(VncState *vs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue