mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
single vnc server surface
This patch removes the server surface from VncState and adds a single server surface to VncDisplay for all the possible clients connected. Each client maintains a different dirty bitmap in VncState. The guest surface is moved to VncDisplay as well because we don't need to track guest updates in more than one place. This patch has been updated to handle CopyRect correctly and efficiently. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
This commit is contained in:
committed by
Anthony Liguori
parent
703bc68ff5
commit
1fc624122f
@@ -84,6 +84,11 @@ typedef struct VncDisplay VncDisplay;
|
||||
#include "vnc-auth-sasl.h"
|
||||
#endif
|
||||
|
||||
struct VncSurface
|
||||
{
|
||||
uint32_t dirty[VNC_MAX_HEIGHT][VNC_DIRTY_WORDS];
|
||||
DisplaySurface *ds;
|
||||
};
|
||||
|
||||
struct VncDisplay
|
||||
{
|
||||
@@ -93,6 +98,9 @@ struct VncDisplay
|
||||
VncState *clients;
|
||||
kbd_layout_t *kbd_layout;
|
||||
|
||||
struct VncSurface guest; /* guest visible surface (aka ds->surface) */
|
||||
DisplaySurface *server; /* vnc server surface */
|
||||
|
||||
char *display;
|
||||
char *password;
|
||||
int auth;
|
||||
@@ -105,19 +113,12 @@ struct VncDisplay
|
||||
#endif
|
||||
};
|
||||
|
||||
struct VncSurface
|
||||
{
|
||||
uint32_t dirty[VNC_MAX_HEIGHT][VNC_DIRTY_WORDS];
|
||||
DisplaySurface *ds;
|
||||
};
|
||||
|
||||
struct VncState
|
||||
{
|
||||
int csock;
|
||||
|
||||
DisplayState *ds;
|
||||
struct VncSurface guest; /* guest visible surface (aka ds->surface) */
|
||||
struct VncSurface server; /* vnc server surface */
|
||||
uint32_t dirty[VNC_MAX_HEIGHT][VNC_DIRTY_WORDS];
|
||||
|
||||
VncDisplay *vd;
|
||||
int need_update;
|
||||
|
||||
+2
-1
@@ -13,7 +13,8 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
|
||||
void *last_fg_,
|
||||
int *has_bg, int *has_fg)
|
||||
{
|
||||
uint8_t *row = vs->server.ds->data + y * ds_get_linesize(vs->ds) + x * ds_get_bytes_per_pixel(vs->ds);
|
||||
VncDisplay *vd = vs->vd;
|
||||
uint8_t *row = vd->server->data + y * ds_get_linesize(vs->ds) + x * ds_get_bytes_per_pixel(vs->ds);
|
||||
pixel_t *irow = (pixel_t *)row;
|
||||
int j, i;
|
||||
pixel_t *last_bg = (pixel_t *)last_bg_;
|
||||
|
||||
Reference in New Issue
Block a user