[Spice-devel] [RFC] server: api: add spice_qxl_* calls based on QXLWorker contents
Alon Levy
alevy at redhat.com
Tue Jul 19 06:08:04 PDT 2011
For each callback in QXLWorker, for example QXLWorker::update_area, add
a direct call named spice_qxl_update_area.
This will (a) remove the pointless indirection and (b) make shared
library versioning alot easier as we'll get new linker symbols which
we can tag with the version they appeared in the shared library.
---
server/red_dispatcher.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++
server/spice.h | 19 +++++++++
2 files changed, 114 insertions(+), 0 deletions(-)
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index 56446ab..d96f01c 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -482,6 +482,101 @@ uint32_t red_dispatcher_qxl_ram_size(void)
return qxl_info.qxl_ram_size;
}
+SPICE_GNUC_VISIBLE
+void spice_qxl_wakeup(QXLWorker *worker)
+{
+ qxl_worker_wakeup(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_oom(QXLWorker *worker)
+{
+ qxl_worker_oom(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_start(QXLWorker *worker)
+{
+ qxl_worker_start(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_stop(QXLWorker *worker)
+{
+ qxl_worker_stop(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_update_area(QXLWorker *qxl_worker, uint32_t surface_id,
+ struct QXLRect *area, struct QXLRect *dirty_rects,
+ uint32_t num_dirty_rects, uint32_t clear_dirty_region)
+{
+ qxl_worker_update_area(qxl_worker, surface_id, area, dirty_rects,
+ num_dirty_rects, clear_dirty_region);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_add_memslot(QXLWorker *worker, QXLDevMemSlot *slot)
+{
+ qxl_worker_add_memslot(worker, slot);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_del_memslot(QXLWorker *worker, uint32_t slot_group_id, uint32_t slot_id)
+{
+ qxl_worker_del_memslot(worker, slot_group_id, slot_id);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_reset_memslots(QXLWorker *worker)
+{
+ qxl_worker_reset_memslots(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_destroy_surfaces(QXLWorker *worker)
+{
+ qxl_worker_destroy_surfaces(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_destroy_primary_surface(QXLWorker *worker, uint32_t surface_id)
+{
+ qxl_worker_destroy_primary(worker, surface_id);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_create_primary_surface(QXLWorker *worker, uint32_t surface_id,
+ QXLDevSurfaceCreate *surface)
+{
+ qxl_worker_create_primary(worker, surface_id, surface);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_reset_image_cache(QXLWorker *worker)
+{
+ qxl_worker_reset_image_cache(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_reset_cursor(QXLWorker *worker)
+{
+ qxl_worker_reset_cursor(worker);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_destroy_surface_wait(QXLWorker *worker, uint32_t surface_id)
+{
+ qxl_worker_destroy_surface_wait(worker, surface_id);
+}
+
+SPICE_GNUC_VISIBLE
+void spice_qxl_loadvm_commands(QXLWorker *worker, struct QXLCommandExt *ext, uint32_t count)
+{
+ qxl_worker_loadvm_commands(worker, ext, count);
+}
+
+
RedDispatcher *red_dispatcher_init(QXLInstance *qxl)
{
RedDispatcher *dispatcher;
diff --git a/server/spice.h b/server/spice.h
index f64ff41..196b90b 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -124,6 +124,25 @@ struct QXLWorker {
void (*loadvm_commands)(QXLWorker *worker, struct QXLCommandExt *ext, uint32_t count);
};
+void spice_qxl_wakeup(QXLWorker *worker);
+void spice_qxl_oom(QXLWorker *worker);
+void spice_qxl_start(QXLWorker *worker);
+void spice_qxl_stop(QXLWorker *worker);
+void spice_qxl_update_area(QXLWorker *qxl_worker, uint32_t surface_id,
+ struct QXLRect *area, struct QXLRect *dirty_rects,
+ uint32_t num_dirty_rects, uint32_t clear_dirty_region);
+void spice_qxl_add_memslot(QXLWorker *worker, QXLDevMemSlot *slot);
+void spice_qxl_del_memslot(QXLWorker *worker, uint32_t slot_group_id, uint32_t slot_id);
+void spice_qxl_reset_memslots(QXLWorker *worker);
+void spice_qxl_destroy_surfaces(QXLWorker *worker);
+void spice_qxl_destroy_primary_surface(QXLWorker *worker, uint32_t surface_id);
+void spice_qxl_create_primary_surface(QXLWorker *worker, uint32_t surface_id,
+ QXLDevSurfaceCreate *surface);
+void spice_qxl_reset_image_cache(QXLWorker *worker);
+void spice_qxl_reset_cursor(QXLWorker *worker);
+void spice_qxl_destroy_surface_wait(QXLWorker *worker, uint32_t surface_id);
+void spice_qxl_loadvm_commands(QXLWorker *worker, struct QXLCommandExt *ext, uint32_t count);
+
typedef struct QXLDrawArea {
uint8_t *buf;
uint32_t size;
--
1.7.6
More information about the Spice-devel
mailing list