summaryrefslogtreecommitdiff
path: root/ui/spice-display.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-06-15 20:44:38 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-07-04 15:35:12 +0200
commit22795174a37e02200944c0d093d518e832650686 (patch)
tree7b3153a87259279fb1a9aefef051120c4eefa752 /ui/spice-display.c
parentfba810f1f67b411c209aa0e3d90724127cbd9c0f (diff)
downloadqemu-22795174a37e02200944c0d093d518e832650686.tar.gz
qxl: set mm_time in vga update
This fixes a problem where on windows 7 startup phase, before the qxl driver is loaded, the drawables are sufficiently large and video like to trigger a stream, but the lack of a filled mm time field triggers a warning in spice-gtk. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r--ui/spice-display.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 15f0704eaf..feeee73dcc 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -70,6 +70,7 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)
QXLCommand *cmd;
uint8_t *src, *dst;
int by, bw, bh;
+ struct timespec time_space;
if (qemu_spice_rect_is_empty(&ssd->dirty)) {
return NULL;
@@ -96,6 +97,10 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd)
drawable->surfaces_dest[0] = -1;
drawable->surfaces_dest[1] = -1;
drawable->surfaces_dest[2] = -1;
+ clock_gettime(CLOCK_MONOTONIC, &time_space);
+ /* time in milliseconds from epoch. */
+ drawable->mm_time = time_space.tv_sec * 1000
+ + time_space.tv_nsec / 1000 / 1000;
drawable->u.copy.rop_descriptor = SPICE_ROPD_OP_PUT;
drawable->u.copy.src_bitmap = (intptr_t)image;