diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-10-03 21:01:38 +0200 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2015-02-23 23:00:41 +0100 |
commit | 6ca865b0b25e89d7028260dda74b646eab72c8de (patch) | |
tree | 2f5bfd9f9b01a518e89f72f6f66ce964e0e02468 | |
parent | 419574986d41424273c8c8cb8709fee66cb68975 (diff) | |
download | spice-6ca865b0b25e89d7028260dda74b646eab72c8de.tar.gz spice-6ca865b0b25e89d7028260dda74b646eab72c8de.tar.xz spice-6ca865b0b25e89d7028260dda74b646eab72c8de.zip |
misc cleanups
-rw-r--r-- | server/cursor-channel.c | 2 | ||||
-rw-r--r-- | server/dcc-send.c | 24 | ||||
-rw-r--r-- | server/red_worker.c | 4 | ||||
-rw-r--r-- | server/red_worker.h | 2 |
4 files changed, 14 insertions, 18 deletions
diff --git a/server/cursor-channel.c b/server/cursor-channel.c index cd6513d5..20e7351a 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@ -412,7 +412,7 @@ static void cursor_channel_release_item(RedChannelClient *rcc, PipeItem *item, i CursorChannel* cursor_channel_new(RedWorker *worker) { CursorChannel *cursor; - RedChannel *channel = NULL; + CommonChannel *channel = NULL; ChannelCbs cbs = { .on_disconnect = cursor_channel_client_on_disconnect, .send_item = cursor_channel_send_item, diff --git a/server/dcc-send.c b/server/dcc-send.c index ddd2c784..61650278 100644 --- a/server/dcc-send.c +++ b/server/dcc-send.c @@ -1994,23 +1994,19 @@ static void red_marshall_image(RedChannelClient *rcc, SpiceMarshaller *m, ImageI if (lossy_comp) { comp_succeeded = dcc_compress_image_jpeg(dcc, &red_image, &bitmap, &comp_send_data, groupid); + } else if (!lz_comp) { + comp_succeeded = dcc_compress_image_quic(dcc, &red_image, &bitmap, &comp_send_data, groupid); } else { - if (!lz_comp) { - comp_succeeded = dcc_compress_image_quic(dcc, &red_image, &bitmap, &comp_send_data, groupid); - } else { #ifdef USE_LZ4 - if (comp_mode == SPICE_IMAGE_COMPRESS_LZ4 && - red_channel_client_test_remote_cap(&dcc->common.base, - SPICE_DISPLAY_CAP_LZ4_COMPRESSION)) { - comp_succeeded = dcc_compress_image_lz4(dcc, &red_image, &bitmap, - &comp_send_data, - groupid); - } else + if (comp_mode == SPICE_IMAGE_COMPRESS_LZ4 && + red_channel_client_test_remote_cap(&dcc->common.base, + SPICE_DISPLAY_CAP_LZ4_COMPRESSION)) { + comp_succeeded = dcc_compress_image_lz4(dcc, &red_image, &bitmap, + &comp_send_data, + groupid); + } else #endif - comp_succeeded = dcc_compress_image_lz(dcc, &red_image, &bitmap, - &comp_send_data, - groupid); - } + comp_succeeded = dcc_compress_image_lz(dcc, &red_image, &bitmap, &comp_send_data, groupid); } surface_lossy_region = &dcc->surface_client_lossy_region[item->surface_id]; diff --git a/server/red_worker.c b/server/red_worker.c index b4a13fa5..bf070aad 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -815,7 +815,7 @@ CommonChannelClient *common_channel_new_client(CommonChannel *common, } -RedChannel *red_worker_new_channel(RedWorker *worker, int size, +CommonChannel *red_worker_new_channel(RedWorker *worker, int size, const char *name, uint32_t channel_type, int migration_flags, ChannelCbs *channel_cbs, @@ -846,7 +846,7 @@ RedChannel *red_worker_new_channel(RedWorker *worker, int size, common = (CommonChannel *)channel; common->worker = worker; - return channel; + return common; } static void guest_set_client_capabilities(RedWorker *worker) diff --git a/server/red_worker.h b/server/red_worker.h index 679a9782..82a7f790 100644 --- a/server/red_worker.h +++ b/server/red_worker.h @@ -109,7 +109,7 @@ RedMemSlotInfo* red_worker_get_memslot(RedWorker *worker); void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable, uint32_t group_id); -RedChannel *red_worker_new_channel(RedWorker *worker, int size, +CommonChannel *red_worker_new_channel(RedWorker *worker, int size, const char *name, uint32_t channel_type, int migration_flags, ChannelCbs *channel_cbs, |