summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-24 18:03:04 +0200
committerFrediano Ziglio <fziglio@redhat.com>2015-11-20 10:17:36 +0000
commit036451cce9d1700145559a96091b3befec377f99 (patch)
tree6a9159d2ae6c8594b34f0346d81d8e03b127a2a8 /server
parent44b2d002460e95a64be22232842d426b0cdf8106 (diff)
downloadspice-036451cce9d1700145559a96091b3befec377f99.zip
spice-036451cce9d1700145559a96091b3befec377f99.tar.gz
spice-036451cce9d1700145559a96091b3befec377f99.tar.xz
worker: move dcc_freeze_glz
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Diffstat (limited to 'server')
-rw-r--r--server/dcc-encoders.c9
-rw-r--r--server/dcc-encoders.h1
-rw-r--r--server/red_worker.c12
3 files changed, 11 insertions, 11 deletions
diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
index d8d6617..e2e25e5 100644
--- a/server/dcc-encoders.c
+++ b/server/dcc-encoders.c
@@ -489,3 +489,12 @@ void dcc_free_glz_drawables_to_free(DisplayChannelClient* dcc)
}
pthread_mutex_unlock(&dcc->glz_drawables_inst_to_free_lock);
}
+
+void dcc_freeze_glz(DisplayChannelClient *dcc)
+{
+ pthread_rwlock_wrlock(&dcc->glz_dict->encode_lock);
+ if (!dcc->glz_dict->migrate_freeze) {
+ dcc->glz_dict->migrate_freeze = TRUE;
+ }
+ pthread_rwlock_unlock(&dcc->glz_dict->encode_lock);
+}
diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h
index 811183c..5ae15ba 100644
--- a/server/dcc-encoders.h
+++ b/server/dcc-encoders.h
@@ -39,6 +39,7 @@ void dcc_encoders_init (DisplayChannelClie
void dcc_free_glz_drawable_instance (DisplayChannelClient *dcc,
GlzDrawableInstanceItem *item);
void dcc_free_glz_drawables_to_free (DisplayChannelClient* dcc);
+void dcc_freeze_glz (DisplayChannelClient *dcc);
void marshaller_add_compressed (SpiceMarshaller *m,
RedCompressBuf *comp_buf,
diff --git a/server/red_worker.c b/server/red_worker.c
index 747bb9e..5550628 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -183,7 +183,6 @@ static void red_update_area_till(DisplayChannel *display, const SpiceRect *area,
Drawable *last);
static inline void display_begin_send_message(RedChannelClient *rcc);
static void dcc_release_glz(DisplayChannelClient *dcc);
-static void red_freeze_glz(DisplayChannelClient *dcc);
static void display_channel_push_release(DisplayChannelClient *dcc, uint8_t type, uint64_t id,
uint64_t* sync_data);
static int red_display_free_some_independent_glz_drawables(DisplayChannelClient *dcc);
@@ -4134,7 +4133,7 @@ static void display_channel_marshall_migrate_data(RedChannelClient *rcc,
sizeof(display_data.pixmap_cache_clients));
spice_assert(dcc->glz_dict);
- red_freeze_glz(dcc);
+ dcc_freeze_glz(dcc);
display_data.glz_dict_id = dcc->glz_dict->id;
glz_enc_dictionary_get_restore_data(dcc->glz_dict->dict,
&display_data.glz_dict_data,
@@ -5057,15 +5056,6 @@ static GlzSharedDictionary *red_restore_glz_dictionary(DisplayChannelClient *dcc
return shared_dict;
}
-static void red_freeze_glz(DisplayChannelClient *dcc)
-{
- pthread_rwlock_wrlock(&dcc->glz_dict->encode_lock);
- if (!dcc->glz_dict->migrate_freeze) {
- dcc->glz_dict->migrate_freeze = TRUE;
- }
- pthread_rwlock_unlock(&dcc->glz_dict->encode_lock);
-}
-
/* destroy encoder, and dictionary if no one uses it*/
static void dcc_release_glz(DisplayChannelClient *dcc)
{