[Spice-commits] server/dcc.c server/red_common.h
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Nov 26 07:01:28 PST 2015
server/dcc.c | 18 ++++++++++++++++--
server/red_common.h | 14 --------------
2 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit 721c03394b6e64ebba9d30a69341fa9ad4609c52
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Thu Nov 26 14:07:13 2015 +0100
server: move LZ_IMAGE_TYPE_* enum to dcc
Signed-off-by: Fabiano FidĂȘncio <fidencio at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
diff --git a/server/dcc.c b/server/dcc.c
index 198c7ab..6e8c876 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
More information about the Spice-commits
mailing list