[Spice-devel] [PATCH v4 10/19] Encapsulate dcc_release_glz
Jonathon Jongsma
jjongsma at redhat.com
Tue Jun 14 20:37:42 UTC 2016
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Tue, 2016-06-14 at 10:33 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/dcc-encoders.c | 4 +++-
> server/dcc-encoders.h | 1 -
> server/dcc.c | 1 -
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
> index f423f22..6668dff 100644
> --- a/server/dcc-encoders.c
> +++ b/server/dcc-encoders.c
> @@ -64,6 +64,7 @@ static void
> image_encoders_free_glz_drawable_instance(ImageEncoders *enc,
> GlzDrawableInstanceItem
> *instance);
> static void encoder_data_init(EncoderData *data);
> static void encoder_data_reset(EncoderData *data);
> +static void image_encoders_release_glz(ImageEncoders *enc);
>
>
> static SPICE_GNUC_NORETURN SPICE_GNUC_PRINTF(2, 3) void
> @@ -459,6 +460,7 @@ void image_encoders_init(ImageEncoders *enc,
> ImageEncoderSharedData *shared_data
>
> void image_encoders_free(ImageEncoders *enc)
> {
> + image_encoders_release_glz(enc);
> quic_destroy(enc->quic);
> enc->quic = NULL;
> lz_destroy(enc->lz);
> @@ -764,7 +766,7 @@ gboolean image_encoders_glz_create(ImageEncoders *enc,
> uint8_t id)
> }
>
> /* destroy encoder, and dictionary if no one uses it*/
> -void image_encoders_release_glz(ImageEncoders *enc)
> +static void image_encoders_release_glz(ImageEncoders *enc)
> {
> GlzSharedDictionary *shared_dict;
>
> diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h
> index 9674465..bdfffe7 100644
> --- a/server/dcc-encoders.h
> +++ b/server/dcc-encoders.h
> @@ -46,7 +46,6 @@ int
> image_encoders_free_some_independent_glz_drawables(ImageEncoders *enc);
> void image_encoders_free_glz_drawables(ImageEncoders *enc);
> void image_encoders_free_glz_drawables_to_free(ImageEncoders* enc);
> gboolean image_encoders_glz_create(ImageEncoders *enc, uint8_t id);
> -void image_encoders_release_glz(ImageEncoders *enc);
> void image_encoders_glz_free_from_drawable(struct Drawable *drawable);
> void image_encoders_glz_detach_from_drawable(struct Drawable *drawable);
> void image_encoders_glz_get_restore_data(ImageEncoders *enc,
> diff --git a/server/dcc.c b/server/dcc.c
> index 6511ce5..e44feb7 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -489,7 +489,6 @@ void dcc_stop(DisplayChannelClient *dcc)
>
> pixmap_cache_unref(dcc->pixmap_cache);
> dcc->pixmap_cache = NULL;
> - image_encoders_release_glz(&dcc->encoders);
> dcc_palette_cache_reset(dcc);
> free(dcc->send_data.stream_outbuf);
> free(dcc->send_data.free_list.res);
More information about the Spice-devel
mailing list