Re: [PATCH 14/18] worker: move dcc_freeze_glz

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Wed, Nov 18, 2015 at 5:17 PM, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> >
> > ---
> >  server/dcc-encoders.c |  9 +++++++++
> >  server/dcc-encoders.h |  1 +
> >  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 385b6b6..6cdac9d 100644
> > --- a/server/dcc-encoders.c
> > +++ b/server/dcc-encoders.c
> > @@ -544,3 +544,12 @@ void dcc_free_glz_drawables(DisplayChannelClient *dcc)
> >      }
> >      pthread_rwlock_unlock(&glz_dict->encode_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 dd3d528..2c01ba4 100644
> > --- a/server/dcc-encoders.h
> > +++ b/server/dcc-encoders.h
> > @@ -44,6 +44,7 @@ void             dcc_free_glz_drawable
> > (DisplayChannelClie
> >                                                                RedGlzDrawable
> >                                                                *drawable);
> >  void             dcc_free_glz_drawables
> >  (DisplayChannelClient *dcc);
> >  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 19d8f43..1c54d51 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);
> > @@ -4067,7 +4066,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,
> > @@ -4992,15 +4991,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)
> >  {
> > --
> > 2.4.3
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
> ACK!
> 
> --
> Fabiano Fidêncio
> 

Merged

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]