[Spice-commits] 2 commits - spice/draw.h spice/enums.h

Alexander Larsson alexl at kemper.freedesktop.org
Mon Jun 21 06:19:05 PDT 2010


 spice/draw.h  |   23 +++++++++++++++++++++++
 spice/enums.h |    8 ++++++++
 2 files changed, 31 insertions(+)

New commits:
commit 99f266577682cdbd82ef9a282d6a763d39d0548f
Author: Yonit Halperin <yhalperi at redhat.com>
Date:   Sun Jun 20 17:18:33 2010 +0300

    add image type for RGBA bitmaps that were compressed by a combination of JPEG (RGB) and LZ (alpha channel).

diff --git a/spice/draw.h b/spice/draw.h
index 874681d..e6fab5c 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -193,6 +193,18 @@ typedef struct SPICE_ATTR_PACKED SpiceZlibGlzRGBImage {
     SpiceZlibGlzRGBData zlib_glz;
 } SpiceZlibGlzRGBImage;
 
+typedef struct SPICE_ATTR_PACKED SpiceJPEGAlphaData {
+    uint8_t flags;
+    uint32_t jpeg_size;
+    uint32_t data_size;
+    uint8_t data[0];
+} SpiceJPEGAlphaData;
+
+typedef struct SPICE_ATTR_PACKED SpiceJPEGAlphaImage {
+    SpiceImageDescriptor descriptor;
+    SpiceJPEGAlphaData jpeg_alpha;
+} SpiceJPEGAlphaImage;
+
 typedef struct SPICE_ATTR_PACKED SpiceOpaque {
     SPICE_ADDRESS src_bitmap;
     SpiceRect src_area;
diff --git a/spice/enums.h b/spice/enums.h
index 4dfda1f..6e8665c 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -130,6 +130,7 @@ enum SpiceImageType {
     SPICE_IMAGE_TYPE_JPEG,
     SPICE_IMAGE_TYPE_FROM_CACHE_LOSSLESS,
     SPICE_IMAGE_TYPE_ZLIB_GLZ_RGB,
+    SPICE_IMAGE_TYPE_JPEG_ALPHA,
 
     SPICE_IMAGE_TYPE_ENUM_END
 };
@@ -165,6 +166,12 @@ enum SpiceBitmapFlags {
     SPICE_BITMAP_FLAGS_MASK = 0x7
 };
 
+enum SpiceJpegAlphaFlags {
+    SPICE_JPEG_ALPHA_FLAGS_TOP_DOWN = (1 << 0),
+
+    SPICE_JPEG_ALPHA_FLAGS_MASK = 0x1
+};
+
 enum SpiceImageScaleMode {
     SPICE_IMAGE_SCALE_MODE_INTERPOLATE,
     SPICE_IMAGE_SCALE_MODE_NEAREST,
commit 63f1c6c01a347ae9564fbbc1f53d114147e04e96
Author: Yonit Halperin <yhalperi at redhat.com>
Date:   Sun Jun 20 15:22:42 2010 +0300

    add image type for images that are compressed by zlib after they have been compressed by glz

diff --git a/spice/draw.h b/spice/draw.h
index ff70e7b..874681d 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -182,6 +182,17 @@ typedef struct SPICE_ATTR_PACKED SpiceJPEGImage {
     SpiceJPEGData jpeg;
 } SpiceJPEGImage;
 
+typedef struct SPICE_ATTR_PACKED SpiceZlibGlzRGBData {
+    uint32_t glz_data_size;
+    uint32_t data_size;
+    uint8_t data[0];
+} SpiceZlibGlzRGBData;
+
+typedef struct SPICE_ATTR_PACKED SpiceZlibGlzRGBImage {
+    SpiceImageDescriptor descriptor;
+    SpiceZlibGlzRGBData zlib_glz;
+} SpiceZlibGlzRGBImage;
+
 typedef struct SPICE_ATTR_PACKED SpiceOpaque {
     SPICE_ADDRESS src_bitmap;
     SpiceRect src_area;
diff --git a/spice/enums.h b/spice/enums.h
index 0ea4e79..4dfda1f 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -129,6 +129,7 @@ enum SpiceImageType {
     SPICE_IMAGE_TYPE_SURFACE,
     SPICE_IMAGE_TYPE_JPEG,
     SPICE_IMAGE_TYPE_FROM_CACHE_LOSSLESS,
+    SPICE_IMAGE_TYPE_ZLIB_GLZ_RGB,
 
     SPICE_IMAGE_TYPE_ENUM_END
 };


More information about the Spice-commits mailing list