mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-14 15:36:25 +00:00
vnc: tight: fix rgb_prepare_row
rgb_prepare_row bpp depends on the server display surface, not the client. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d01f959540
commit
4043a0137b
@ -1180,12 +1180,17 @@ DEFINE_RGB_GET_ROW_FUNCTION(32)
|
|||||||
static void rgb_prepare_row(VncState *vs, uint8_t *dst, int x, int y,
|
static void rgb_prepare_row(VncState *vs, uint8_t *dst, int x, int y,
|
||||||
int count)
|
int count)
|
||||||
{
|
{
|
||||||
if (vs->tight.pixel24)
|
if (ds_get_bytes_per_pixel(vs->ds) == 4) {
|
||||||
rgb_prepare_row24(vs, dst, x, y, count);
|
if (vs->ds->surface->pf.rmax == 0xFF &&
|
||||||
else if (ds_get_bytes_per_pixel(vs->ds) == 4)
|
vs->ds->surface->pf.gmax == 0xFF &&
|
||||||
rgb_prepare_row32(vs, dst, x, y, count);
|
vs->ds->surface->pf.bmax == 0xFF) {
|
||||||
else
|
rgb_prepare_row24(vs, dst, x, y, count);
|
||||||
|
} else {
|
||||||
|
rgb_prepare_row32(vs, dst, x, y, count);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
rgb_prepare_row16(vs, dst, x, y, count);
|
rgb_prepare_row16(vs, dst, x, y, count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_VNC_JPEG or CONFIG_VNC_PNG */
|
#endif /* CONFIG_VNC_JPEG or CONFIG_VNC_PNG */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user