Re: [PATCH v2] server: move LZ_IMAGE_TYPE_* enum to dcc

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

 



> 
> On Thu, 2015-11-26 at 14:07 +0100, Fabiano Fidêncio wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> > 
> > Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
> > ---
> >  server/dcc.c        | 18 ++++++++++++++++--
> >  server/red_common.h | 14 --------------
> >  2 files changed, 16 insertions(+), 16 deletions(-)
> > 
> > diff --git a/server/dcc.c b/server/dcc.c
> > index 6c089da..ffe5b34 100644
> > --- a/server/dcc.c
> > +++ b/server/dcc.c
> > @@ -616,6 +616,20 @@ static GlzDrawableInstanceItem
> > *add_glz_drawable_instance(RedGlzDrawable *glz_dr
> >      return ret;
> >  }
> >  
> > +static const LzImageType bitmap_fmt_to_lz_image_type[] = {
> > +    LZ_IMAGE_TYPE_INVALID,
> > +    LZ_IMAGE_TYPE_PLT1_LE,
> > +    LZ_IMAGE_TYPE_PLT1_BE,
> > +    LZ_IMAGE_TYPE_PLT4_LE,
> > +    LZ_IMAGE_TYPE_PLT4_BE,
> > +    LZ_IMAGE_TYPE_PLT8,
> > +    LZ_IMAGE_TYPE_RGB16,
> > +    LZ_IMAGE_TYPE_RGB24,
> > +    LZ_IMAGE_TYPE_RGB32,
> > +    LZ_IMAGE_TYPE_RGBA,
> > +    LZ_IMAGE_TYPE_A8
> > +};
> > +
> >  #define MIN_GLZ_SIZE_FOR_ZLIB 100
> >  
> >  int dcc_compress_image_glz(DisplayChannelClient *dcc,
> > @@ -629,7 +643,7 @@ int dcc_compress_image_glz(DisplayChannelClient *dcc,
> >      spice_assert(bitmap_fmt_is_rgb(src->format));
> >      GlzData *glz_data = &dcc->glz_data;
> >      ZlibData *zlib_data;
> > -    LzImageType type = MAP_BITMAP_FMT_TO_LZ_IMAGE_TYPE[src->format];
> > +    LzImageType type = bitmap_fmt_to_lz_image_type[src->format];
> >      RedGlzDrawable *glz_drawable;
> >      GlzDrawableInstanceItem *glz_drawable_instance;
> >      int glz_size;
> > @@ -710,7 +724,7 @@ int dcc_compress_image_lz(DisplayChannelClient *dcc,
> >  {
> >      LzData *lz_data = &dcc->lz_data;
> >      LzContext *lz = dcc->lz;
> > -    LzImageType type = MAP_BITMAP_FMT_TO_LZ_IMAGE_TYPE[src->format];
> > +    LzImageType type = bitmap_fmt_to_lz_image_type[src->format];
> >      int size;            // size of the compressed data
> >  
> >  #ifdef COMPRESS_STAT
> > diff --git a/server/red_common.h b/server/red_common.h
> > index 04d4c02..7f1677e 100644
> > --- a/server/red_common.h
> > +++ b/server/red_common.h
> > @@ -30,18 +30,4 @@
> >  
> >  #define SPICE_GNUC_VISIBLE __attribute__ ((visibility ("default")))
> >  
> > -static const LzImageType MAP_BITMAP_FMT_TO_LZ_IMAGE_TYPE[] = {
> > -    LZ_IMAGE_TYPE_INVALID,
> > -    LZ_IMAGE_TYPE_PLT1_LE,
> > -    LZ_IMAGE_TYPE_PLT1_BE,
> > -    LZ_IMAGE_TYPE_PLT4_LE,
> > -    LZ_IMAGE_TYPE_PLT4_BE,
> > -    LZ_IMAGE_TYPE_PLT8,
> > -    LZ_IMAGE_TYPE_RGB16,
> > -    LZ_IMAGE_TYPE_RGB24,
> > -    LZ_IMAGE_TYPE_RGB32,
> > -    LZ_IMAGE_TYPE_RGBA,
> > -    LZ_IMAGE_TYPE_A8
> > -};
> > -
> >  #endif
> 
> Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
> 
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]