[Spice-devel] [PATCH v3 09/17] Encapsulate dcc_release_glz
Frediano Ziglio
fziglio at redhat.com
Fri Jun 10 08:48:08 UTC 2016
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 c2bc88c..f695210 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, ImageEncoderGlobals *globals)
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 1600063..97f6200 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);
--
2.7.4
More information about the Spice-devel
mailing list