[Spice-commits] server/display-channel.c server/display-channel.h server/red_worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Nov 5 04:41:36 PST 2015
server/display-channel.c | 40 ++++++++++++++++++++++++++++++++++++++++
server/display-channel.h | 1 +
server/red_worker.c | 41 -----------------------------------------
3 files changed, 41 insertions(+), 41 deletions(-)
New commits:
commit e603e96837d882174c55dc8e01750d0116881077
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Sep 13 21:16:22 2013 +0200
worker: move MonitorsConfig to display channel
Acked-by: Fabiano FidĂȘncio <fidencio at redhat.com>
diff --git a/server/display-channel.c b/server/display-channel.c
index c7cb3df..3dc5a94 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -81,3 +81,43 @@ MonitorsConfig* monitors_config_new(QXLHead *heads, ssize_t nheads, ssize_t max)
return mc;
}
+
+static MonitorsConfigItem *monitors_config_item_new(RedChannel* channel,
+ MonitorsConfig *monitors_config)
+{
+ MonitorsConfigItem *mci;
+
+ mci = (MonitorsConfigItem *)spice_malloc(sizeof(*mci));
+ mci->monitors_config = monitors_config;
+
+ red_channel_pipe_item_init(channel,
+ &mci->pipe_item, PIPE_ITEM_TYPE_MONITORS_CONFIG);
+ return mci;
+}
+
+static inline void red_monitors_config_item_add(DisplayChannelClient *dcc)
+{
+ DisplayChannel *dc = DCC_TO_DC(dcc);
+ MonitorsConfigItem *mci;
+
+ mci = monitors_config_item_new(dcc->common.base.channel,
+ monitors_config_ref(dc->monitors_config));
+ red_channel_client_pipe_add(&dcc->common.base, &mci->pipe_item);
+}
+
+void dcc_push_monitors_config(DisplayChannelClient *dcc)
+{
+ MonitorsConfig *monitors_config = DCC_TO_DC(dcc)->monitors_config;
+
+ if (monitors_config == NULL) {
+ spice_warning("monitors_config is NULL");
+ return;
+ }
+
+ if (!red_channel_client_test_remote_cap(&dcc->common.base,
+ SPICE_DISPLAY_CAP_MONITORS_CONFIG)) {
+ return;
+ }
+ red_monitors_config_item_add(dcc);
+ red_channel_client_push(&dcc->common.base);
+}
diff --git a/server/display-channel.h b/server/display-channel.h
index 48e28a6..d6d65e0 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -296,6 +296,7 @@ DisplayChannelClient* dcc_new (DisplayCha
int num_common_caps,
uint32_t *caps,
int num_caps);
+void dcc_push_monitors_config (DisplayChannelClient *dcc);
typedef struct DrawablePipeItem {
RingItem base; /* link for a list of pipe items held by Drawable */
diff --git a/server/red_worker.c b/server/red_worker.c
index 4a43154..2ba1896 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -539,7 +539,6 @@ static void display_channel_client_release_item_before_push(DisplayChannelClient
PipeItem *item);
static void display_channel_client_release_item_after_push(DisplayChannelClient *dcc,
PipeItem *item);
-static void dcc_push_monitors_config(DisplayChannelClient *dcc);
/*
* Macros to make iterating over stuff easier
@@ -9523,29 +9522,6 @@ void handle_dev_destroy_surfaces(void *opaque, void *payload)
dev_destroy_surfaces(worker);
}
-static MonitorsConfigItem *monitors_config_item_new(
- RedChannel* channel, MonitorsConfig *monitors_config)
-{
- MonitorsConfigItem *mci;
-
- mci = (MonitorsConfigItem *)spice_malloc(sizeof(*mci));
- mci->monitors_config = monitors_config;
-
- red_channel_pipe_item_init(channel,
- &mci->pipe_item, PIPE_ITEM_TYPE_MONITORS_CONFIG);
- return mci;
-}
-
-static inline void red_monitors_config_item_add(DisplayChannelClient *dcc)
-{
- DisplayChannel *dc = DCC_TO_DC(dcc);
- MonitorsConfigItem *mci;
-
- mci = monitors_config_item_new(dcc->common.base.channel,
- monitors_config_ref(dc->monitors_config));
- red_channel_client_pipe_add(&dcc->common.base, &mci->pipe_item);
-}
-
static void display_update_monitors_config(DisplayChannel *display,
QXLMonitorsConfig *config,
uint16_t count, uint16_t max_allowed)
@@ -9558,23 +9534,6 @@ static void display_update_monitors_config(DisplayChannel *display,
monitors_config_new(config->heads, count, max_allowed);
}
-static void dcc_push_monitors_config(DisplayChannelClient *dcc)
-{
- MonitorsConfig *monitors_config = DCC_TO_DC(dcc)->monitors_config;
-
- if (monitors_config == NULL) {
- spice_warning("monitors_config is NULL");
- return;
- }
-
- if (!red_channel_client_test_remote_cap(&dcc->common.base,
- SPICE_DISPLAY_CAP_MONITORS_CONFIG)) {
- return;
- }
- red_monitors_config_item_add(dcc);
- red_channel_client_push(&dcc->common.base);
-}
-
static void red_worker_push_monitors_config(RedWorker *worker)
{
DisplayChannelClient *dcc;
More information about the Spice-commits
mailing list