summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2015-11-12 13:24:58 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-11-12 12:32:27 +0000
commitf4810b0065c17506039e981349557cf95a8b08f7 (patch)
tree8d162d2c05ff6757efd920ae4bac74e6de8807c6
parent120c9ae38bb26150f5d90d1817a99065dfa37133 (diff)
downloadspice-f4810b0065c17506039e981349557cf95a8b08f7.zip
spice-f4810b0065c17506039e981349557cf95a8b08f7.tar.gz
spice-f4810b0065c17506039e981349557cf95a8b08f7.tar.xz
worker: Remove usage of streaming_video global in DisplayChannel
Avoid creating streams for every image due to not properly initialized DisplayChannel->stream_video field. Regression since: 4987df8e67f48cde13d39f4e81909f672ae33e29 Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--server/red_worker.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 286bde4..633e1d0 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1975,13 +1975,12 @@ static void before_reattach_stream(DisplayChannel *display,
}
}
-static void update_copy_graduality(Drawable *drawable)
+static void update_copy_graduality(DisplayChannel *display, Drawable *drawable)
{
SpiceBitmap *bitmap;
spice_return_if_fail(drawable->red_drawable->type == QXL_DRAW_COPY);
- /* TODO: global property -> per dc/dcc */
- if (streaming_video != SPICE_STREAM_VIDEO_FILTER) {
+ if (display->stream_video != SPICE_STREAM_VIDEO_FILTER) {
drawable->copy_bitmap_graduality = BITMAP_GRADUAL_INVALID;
return;
}
@@ -2014,7 +2013,7 @@ static int display_channel_stream_add_frame(DisplayChannel *display,
int gradual_frames_count,
int last_gradual_frame)
{
- update_copy_graduality(frame_drawable);
+ update_copy_graduality(display, frame_drawable);
frame_drawable->frames_count = frames_count + 1;
frame_drawable->gradual_frames_count = gradual_frames_count;
@@ -8537,7 +8536,7 @@ static void init_streams(DisplayChannel *display)
}
}
-static void display_channel_create(RedWorker *worker, int migrate)
+static void display_channel_create(RedWorker *worker, int migrate, int stream_video)
{
DisplayChannel *display_channel;
ChannelCbs cbs = {
@@ -8585,6 +8584,7 @@ static void display_channel_create(RedWorker *worker, int migrate)
display_channel->num_renderers = num_renderers;
memcpy(display_channel->renderers, renderers, sizeof(display_channel->renderers));
display_channel->renderer = RED_RENDERER_INVALID;
+ display_channel->stream_video = stream_video;
init_streams(display_channel);
image_cache_init(&display_channel->image_cache);
ring_init(&display_channel->current_list);
@@ -9752,7 +9752,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher)
worker->cursor_channel = cursor_channel_new(worker);
// TODO: handle seemless migration. Temp, setting migrate to FALSE
- display_channel_create(worker, FALSE);
+ display_channel_create(worker, FALSE, streaming_video);
return worker;
}