diff options
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r-- | ui/spice-display.c | 95 |
1 files changed, 89 insertions, 6 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c index feeee73dcc..1e6a38f86c 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -62,6 +62,89 @@ void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r) dest->right = MAX(dest->right, r->right); } + +void qemu_spice_update_area(SimpleSpiceDisplay *ssd, uint32_t surface_id, + struct QXLRect *area, struct QXLRect *dirty_rects, + uint32_t num_dirty_rects, + uint32_t clear_dirty_region) +{ + ssd->worker->update_area(ssd->worker, surface_id, area, dirty_rects, + num_dirty_rects, clear_dirty_region); +} + +void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot) +{ + ssd->worker->add_memslot(ssd->worker, memslot); +} + +void qemu_spice_del_memslot(SimpleSpiceDisplay *ssd, uint32_t gid, uint32_t sid) +{ + ssd->worker->del_memslot(ssd->worker, gid, sid); +} + +void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id, + QXLDevSurfaceCreate *surface) +{ + ssd->worker->create_primary_surface(ssd->worker, id, surface); +} + +void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id) +{ + ssd->worker->destroy_primary_surface(ssd->worker, id); +} + +void qemu_spice_destroy_surface_wait(SimpleSpiceDisplay *ssd, uint32_t id) +{ + ssd->worker->destroy_surface_wait(ssd->worker, id); +} + +void qemu_spice_loadvm_commands(SimpleSpiceDisplay *ssd, + struct QXLCommandExt *ext, uint32_t count) +{ + ssd->worker->loadvm_commands(ssd->worker, ext, count); +} + +void qemu_spice_wakeup(SimpleSpiceDisplay *ssd) +{ + ssd->worker->wakeup(ssd->worker); +} + +void qemu_spice_oom(SimpleSpiceDisplay *ssd) +{ + ssd->worker->oom(ssd->worker); +} + +void qemu_spice_start(SimpleSpiceDisplay *ssd) +{ + ssd->worker->start(ssd->worker); +} + +void qemu_spice_stop(SimpleSpiceDisplay *ssd) +{ + ssd->worker->stop(ssd->worker); +} + +void qemu_spice_reset_memslots(SimpleSpiceDisplay *ssd) +{ + ssd->worker->reset_memslots(ssd->worker); +} + +void qemu_spice_destroy_surfaces(SimpleSpiceDisplay *ssd) +{ + ssd->worker->destroy_surfaces(ssd->worker); +} + +void qemu_spice_reset_image_cache(SimpleSpiceDisplay *ssd) +{ + ssd->worker->reset_image_cache(ssd->worker); +} + +void qemu_spice_reset_cursor(SimpleSpiceDisplay *ssd) +{ + ssd->worker->reset_cursor(ssd->worker); +} + + static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd) { SimpleSpiceUpdate *update; @@ -161,7 +244,7 @@ void qemu_spice_create_host_memslot(SimpleSpiceDisplay *ssd) memset(&memslot, 0, sizeof(memslot)); memslot.slot_group_id = MEMSLOT_GROUP_HOST; memslot.virt_end = ~0; - ssd->worker->add_memslot(ssd->worker, &memslot); + qemu_spice_add_memslot(ssd, &memslot); } void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd) @@ -181,14 +264,14 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd) surface.mem = (intptr_t)ssd->buf; surface.group_id = MEMSLOT_GROUP_HOST; - ssd->worker->create_primary_surface(ssd->worker, 0, &surface); + qemu_spice_create_primary_surface(ssd, 0, &surface); } void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd) { dprint(1, "%s:\n", __FUNCTION__); - ssd->worker->destroy_primary_surface(ssd->worker, 0); + qemu_spice_destroy_primary_surface(ssd, 0); } void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason) @@ -196,9 +279,9 @@ void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason) SimpleSpiceDisplay *ssd = opaque; if (running) { - ssd->worker->start(ssd->worker); + qemu_spice_start(ssd); } else { - ssd->worker->stop(ssd->worker); + qemu_spice_stop(ssd); } ssd->running = running; } @@ -267,7 +350,7 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) if (ssd->notify) { ssd->notify = 0; - ssd->worker->wakeup(ssd->worker); + qemu_spice_wakeup(ssd); dprint(2, "%s: notify\n", __FUNCTION__); } } |