diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2015-11-13 10:29:11 -0600 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-11-16 12:44:32 +0000 |
commit | e49072492a9f08d2aa07e103fc8f77a8bb13a64f (patch) | |
tree | 0357e99a2e6fab2a6fe157691da1a31fc1b4e3d1 /server/display-channel.c | |
parent | 37763930cdc3c9d62e1cfe2384e841260948505e (diff) | |
download | spice-e49072492a9f08d2aa07e103fc8f77a8bb13a64f.tar.gz spice-e49072492a9f08d2aa07e103fc8f77a8bb13a64f.tar.xz spice-e49072492a9f08d2aa07e103fc8f77a8bb13a64f.zip |
Move dcc_push_stream_agent_clip() to display channel
rename to dcc_add_stream_agent_clip()
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Diffstat (limited to 'server/display-channel.c')
-rw-r--r-- | server/display-channel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/display-channel.c b/server/display-channel.c index 51302bdc..63d56b46 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -141,6 +141,21 @@ DisplayChannelClient *dcc_new(DisplayChannel *display, return dcc; } +void dcc_add_stream_agent_clip(DisplayChannelClient* dcc, StreamAgent *agent) +{ + StreamClipItem *item = stream_clip_item_new(dcc, agent); + int n_rects; + + item->clip_type = SPICE_CLIP_TYPE_RECTS; + + n_rects = pixman_region32_n_rects(&agent->clip); + item->rects = spice_malloc_n_m(n_rects, sizeof(SpiceRect), sizeof(SpiceClipRects)); + item->rects->num_rects = n_rects; + region_ret_rects(&agent->clip, item->rects->rects, n_rects); + + red_channel_client_pipe_add(RED_CHANNEL_CLIENT(dcc), (PipeItem *)item); +} + MonitorsConfig* monitors_config_ref(MonitorsConfig *monitors_config) { monitors_config->refs++; |