vnc: encapsulate encoding members
This will allow to implement the threaded VNC server in a
more cleaner way.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/ui/vnc-enc-hextile.c b/ui/vnc-enc-hextile.c
index fa4b264..364a491 100644
--- a/ui/vnc-enc-hextile.c
+++ b/ui/vnc-enc-hextile.c
@@ -75,7 +75,7 @@
has_fg = has_bg = 0;
for (j = y; j < (y + h); j += 16) {
for (i = x; i < (x + w); i += 16) {
- vs->send_hextile_tile(vs, i, j,
+ vs->hextile.send_tile(vs, i, j,
MIN(16, x + w - i), MIN(16, y + h - j),
last_bg, last_fg, &has_bg, &has_fg);
}
@@ -91,25 +91,25 @@
if (!generic) {
switch (vs->ds->surface->pf.bits_per_pixel) {
case 8:
- vs->send_hextile_tile = send_hextile_tile_8;
+ vs->hextile.send_tile = send_hextile_tile_8;
break;
case 16:
- vs->send_hextile_tile = send_hextile_tile_16;
+ vs->hextile.send_tile = send_hextile_tile_16;
break;
case 32:
- vs->send_hextile_tile = send_hextile_tile_32;
+ vs->hextile.send_tile = send_hextile_tile_32;
break;
}
} else {
switch (vs->ds->surface->pf.bits_per_pixel) {
case 8:
- vs->send_hextile_tile = send_hextile_tile_generic_8;
+ vs->hextile.send_tile = send_hextile_tile_generic_8;
break;
case 16:
- vs->send_hextile_tile = send_hextile_tile_generic_16;
+ vs->hextile.send_tile = send_hextile_tile_generic_16;
break;
case 32:
- vs->send_hextile_tile = send_hextile_tile_generic_32;
+ vs->hextile.send_tile = send_hextile_tile_generic_32;
break;
}
}