aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-09-04 11:39:41 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-09-05 17:11:56 +0200
commitddd8fdc78ee30fc445e3d1f5bd2056acfcdefe47 (patch)
treee707cd43a4c5343fec49f89ac868db51e06c1853 /ui
parent2e0e3c399aa8067148055b9ea0edb822c5b584d2 (diff)
spice: make number of surfaces runtime-configurable.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/spice-display.c5
-rw-r--r--ui/spice-display.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 1c31418a4c..99bc665bc7 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -317,6 +317,9 @@ void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd, DisplayState *ds)
qemu_mutex_init(&ssd->lock);
ssd->mouse_x = -1;
ssd->mouse_y = -1;
+ if (ssd->num_surfaces == 0) {
+ ssd->num_surfaces = 1024;
+ }
ssd->bufsize = (16 * 1024 * 1024);
ssd->buf = g_malloc(ssd->bufsize);
}
@@ -427,7 +430,7 @@ static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info)
info->num_memslots_groups = NUM_MEMSLOTS_GROUPS;
info->internal_groupslot_id = 0;
info->qxl_ram_size = ssd->bufsize;
- info->n_surfaces = NUM_SURFACES;
+ info->n_surfaces = ssd->num_surfaces;
}
static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
diff --git a/ui/spice-display.h b/ui/spice-display.h
index bcff1147bf..512ab7831b 100644
--- a/ui/spice-display.h
+++ b/ui/spice-display.h
@@ -32,8 +32,6 @@
#define MEMSLOT_GROUP_GUEST 1
#define NUM_MEMSLOTS_GROUPS 2
-#define NUM_SURFACES 1024
-
/*
* Internal enum to differenciate between options for
* io calls that have a sync (old) version and an _async (new)
@@ -80,6 +78,7 @@ struct SimpleSpiceDisplay {
QXLInstance qxl;
uint32_t unique;
QemuPfConv *conv;
+ int32_t num_surfaces;
QXLRect dirty;
int notify;