[Spice-devel] [PATCH v6 1/7] Rename encoder_globals to encoder_shared_data
Jonathon Jongsma
jjongsma at redhat.com
Thu Jun 16 19:46:03 UTC 2016
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Thu, 2016-06-16 at 10:41 +0100, Frediano Ziglio wrote:
> Was missing due to a mistake.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/dcc.c | 6 +++---
> server/display-channel.c | 10 +++++-----
> server/display-channel.h | 2 +-
> server/red-worker.c | 4 ++--
> 4 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/server/dcc.c b/server/dcc.c
> index 48c009d..099f5f6 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -388,7 +388,7 @@ DisplayChannelClient *dcc_new(DisplayChannel *display,
>
> dcc_init_stream_agents(dcc);
>
> - image_encoders_init(&dcc->encoders, &display->encoder_globals);
> + image_encoders_init(&dcc->encoders, &display->encoder_shared_data);
>
> return dcc;
> }
> @@ -720,7 +720,7 @@ int dcc_compress_image(DisplayChannelClient *dcc,
> stat_start_time_t start_time;
> int success = FALSE;
>
> - stat_start_time_init(&start_time, &display_channel-
> >encoder_globals.off_stat);
> + stat_start_time_init(&start_time, &display_channel-
> >encoder_shared_data.off_stat);
>
> image_compression = get_compression_for_bitmap(src, dcc-
> >image_compression, drawable);
> switch (image_compression) {
> @@ -771,7 +771,7 @@ lz_compress:
>
> if (!success) {
> uint64_t image_size = src->stride * src->y;
> - stat_compress_add(&display_channel->encoder_globals.off_stat,
> start_time, image_size, image_size);
> + stat_compress_add(&display_channel->encoder_shared_data.off_stat,
> start_time, image_size, image_size);
> }
>
> return success;
> diff --git a/server/display-channel.c b/server/display-channel.c
> index fae2e25..4a0094b 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -38,7 +38,7 @@ void display_channel_compress_stats_reset(DisplayChannel
> *display)
> {
> spice_return_if_fail(display);
>
> - image_encoder_shared_stat_reset(&display->encoder_globals);
> + image_encoder_shared_stat_reset(&display->encoder_shared_data);
> }
>
> void display_channel_compress_stats_print(const DisplayChannel
> *display_channel)
> @@ -47,7 +47,7 @@ void display_channel_compress_stats_print(const
> DisplayChannel *display_channel)
> spice_return_if_fail(display_channel);
>
> spice_info("==> Compression stats for display %u", display_channel-
> >common.base.id);
> - image_encoder_shared_stat_print(&display_channel->encoder_globals);
> + image_encoder_shared_stat_print(&display_channel->encoder_shared_data);
> #endif
> }
>
> @@ -1204,7 +1204,7 @@ void display_channel_free_some(DisplayChannel *display)
> GList *link, *next;
>
> spice_debug("#draw=%d, #glz_draw=%d", display->drawable_count,
> - display->encoder_globals.glz_drawable_count);
> + display->encoder_shared_data.glz_drawable_count);
> FOREACH_CLIENT(display, link, next, dcc) {
> GlzSharedDictionary *glz_dict = dcc->encoders.glz_dict;
>
> @@ -1854,7 +1854,7 @@ static void on_disconnect(RedChannelClient *rcc)
> // this was the last channel client
> spice_debug("#draw=%d, #glz_draw=%d",
> display->drawable_count,
> - display->encoder_globals.glz_drawable_count);
> + display->encoder_shared_data.glz_drawable_count);
> }
>
> static int handle_migrate_flush_mark(RedChannelClient *rcc)
> @@ -1927,7 +1927,7 @@ DisplayChannel* display_channel_new(SpiceServer *reds,
> RedWorker *worker,
> display->non_cache_counter = stat_add_counter(reds, channel->stat,
> "non_cache", TRUE);
> #endif
> - image_encoder_shared_init(&display->encoder_globals);
> + image_encoder_shared_init(&display->encoder_shared_data);
>
> display->n_surfaces = n_surfaces;
> display->renderer = RED_RENDERER_INVALID;
> diff --git a/server/display-channel.h b/server/display-channel.h
> index 04ae0d0..14c0b90 100644
> --- a/server/display-channel.h
> +++ b/server/display-channel.h
> @@ -209,7 +209,7 @@ struct DisplayChannel {
> uint64_t *add_to_cache_counter;
> uint64_t *non_cache_counter;
> #endif
> - ImageEncoderSharedData encoder_globals;
> + ImageEncoderSharedData encoder_shared_data;
> };
>
> static inline int get_stream_id(DisplayChannel *display, Stream *stream)
> diff --git a/server/red-worker.c b/server/red-worker.c
> index f8b1913..9238632 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -823,7 +823,7 @@ static void handle_dev_oom(void *opaque, void *payload)
> // streams? but without streams also leak
> spice_debug("OOM1 #draw=%u, #glz_draw=%u current %u pipes %u",
> display->drawable_count,
> - display->encoder_globals.glz_drawable_count,
> + display->encoder_shared_data.glz_drawable_count,
> display->current_size,
> red_channel_sum_pipes_size(display_red_channel));
> while (red_process_display(worker, &ring_is_empty)) {
> @@ -835,7 +835,7 @@ static void handle_dev_oom(void *opaque, void *payload)
> }
> spice_debug("OOM2 #draw=%u, #glz_draw=%u current %u pipes %u",
> display->drawable_count,
> - display->encoder_globals.glz_drawable_count,
> + display->encoder_shared_data.glz_drawable_count,
> display->current_size,
> red_channel_sum_pipes_size(display_red_channel));
> red_qxl_clear_pending(worker->qxl->st, RED_DISPATCHER_PENDING_OOM);
More information about the Spice-devel
mailing list