From fbdea0fa790ba3f836fe0c6d60441b716c7d0bd3 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Mon, 8 Feb 2016 19:57:58 +0000 Subject: CommonChannel: hold a reference to QXLInstance instead of RedWorker CommonChannel does not need to know about RedWorker. This reduce a bit dependencies between objects. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/red-worker.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/red-worker.h') diff --git a/server/red-worker.h b/server/red-worker.h index 005c15f4..12859428 100644 --- a/server/red-worker.h +++ b/server/red-worker.h @@ -38,7 +38,7 @@ typedef struct CommonChannelClient { typedef struct CommonChannel { RedChannel base; // Must be the first thing - struct RedWorker *worker; + QXLInstance *qxl; uint8_t recv_buf[CHANNEL_RECEIVE_BUF_SIZE]; uint32_t id_alloc; // bitfield. TODO - use this instead of shift scheme. int during_target_migrate; /* TRUE when the client that is associated with the channel @@ -97,7 +97,8 @@ QXLInstance* red_worker_get_qxl(RedWorker *worker); RedChannel* red_worker_get_cursor_channel(RedWorker *worker); RedChannel* red_worker_get_display_channel(RedWorker *worker); -void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable, +struct DisplayChannel; +void red_drawable_unref(struct DisplayChannel *display, RedDrawable *red_drawable, uint32_t group_id); CommonChannel *red_worker_new_channel(RedWorker *worker, int size, -- cgit v1.2.3