diff options
-rw-r--r-- | server/dcc-encoders.c | 9 | ||||
-rw-r--r-- | server/dcc-encoders.h | 1 | ||||
-rw-r--r-- | server/red_worker.c | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c index d8d6617e..e2e25e51 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 811183cf..5ae15ba4 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 747bb9ed..55506288 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) { |