mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-09 11:50:55 +00:00
worker: move dcc_freeze_glz
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
44b2d00246
commit
036451cce9
@ -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);
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user