[Spice-commits] 4 commits - spice/draw.h spice/protocol.h spice/qxl_dev.h

Alexander Larsson alexl at kemper.freedesktop.org
Fri Apr 23 07:54:46 PDT 2010


 spice/draw.h     |   31 ++++++++++++++++++++++++-------
 spice/protocol.h |    3 +--
 spice/qxl_dev.h  |    4 ++--
 3 files changed, 27 insertions(+), 11 deletions(-)

New commits:
commit 797d4c1ca8a6be5d42782d03c6d8b47c4232cde1
Author: Alexander Larsson <alexl at redhat.com>
Date:   Fri Apr 23 11:00:40 2010 +0200

    Add source/dest alpha information to AlphaBlend

diff --git a/spice/draw.h b/spice/draw.h
index 45b3752..6aeb451 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -280,7 +280,13 @@ typedef struct SPICE_ATTR_PACKED SpiceTransparent {
     uint32_t true_color;
 } SpiceTransparent;
 
+enum {
+    SPICE_ALPHA_FLAGS_DEST_HAS_ALPHA = (1 << 0),
+    SPICE_ALPHA_FLAGS_SRC_SURFACE_HAS_ALPHA = (1 << 1),
+};
+
 typedef struct SPICE_ATTR_PACKED SpiceAlphaBlnd {
+    uint16_t alpha_flags;
     uint8_t alpha;
     SPICE_ADDRESS src_bitmap;
     SpiceRect src_area;
commit 916f3818d8200efe0c2c5c90aaf8b197be562eba
Author: Alexander Larsson <alexl at redhat.com>
Date:   Mon Apr 19 15:46:53 2010 +0200

    Pass format when creating surfaces rather than depth

diff --git a/spice/protocol.h b/spice/protocol.h
index c63d1a1..c78ba8c 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -411,9 +411,8 @@ typedef struct SPICE_ATTR_PACKED SpiceMsgSurfaceCreate {
     uint32_t surface_id;
     uint32_t width;
     uint32_t height;
-    uint8_t depth;
+    uint32_t format;
     uint32_t flags;
-    uint32_t type;
 } SpiceMsgSurfaceCreate;
 
 typedef struct SPICE_ATTR_PACKED SpiceMsgSurfaceDestroy {
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 2873101..30f8eab 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -145,7 +145,7 @@ typedef struct SPICE_ATTR_PACKED QXLSurfaceCreate {
     uint32_t width;
     uint32_t height;
     int32_t stride;
-    uint32_t depth;
+    uint32_t format;
     uint32_t position;
     uint32_t mouse_mode;
     uint32_t flags;
@@ -312,7 +312,7 @@ enum QXLSurfaceCmdType {
 };
 
 typedef struct SPICE_ATTR_PACKED QXLSurface {
-    uint8_t depth;
+    uint32_t format;
     uint32_t width;
     uint32_t height;
     int32_t stride;
commit 8ef80db4acdd52e8c1fd24f26606e5ec0e6d9181
Author: Alexander Larsson <alexl at redhat.com>
Date:   Mon Apr 19 15:46:37 2010 +0200

    Add some comment describing the bitmap formats

diff --git a/spice/draw.h b/spice/draw.h
index 2552fa0..45b3752 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -183,15 +183,15 @@ typedef struct SPICE_ATTR_PACKED SpiceImageDescriptor {
 
 enum {
     SPICE_BITMAP_FMT_INVALID,
-    SPICE_BITMAP_FMT_1BIT_LE,
+    SPICE_BITMAP_FMT_1BIT_LE /* unused */,
     SPICE_BITMAP_FMT_1BIT_BE,
-    SPICE_BITMAP_FMT_4BIT_LE,
+    SPICE_BITMAP_FMT_4BIT_LE /* unused */,
     SPICE_BITMAP_FMT_4BIT_BE,
-    SPICE_BITMAP_FMT_8BIT,
-    SPICE_BITMAP_FMT_16BIT,
-    SPICE_BITMAP_FMT_24BIT,
-    SPICE_BITMAP_FMT_32BIT,
-    SPICE_BITMAP_FMT_RGBA,
+    SPICE_BITMAP_FMT_8BIT /* 8bit indexed mode */,
+    SPICE_BITMAP_FMT_16BIT /* 555 format */,
+    SPICE_BITMAP_FMT_24BIT /* 3 byte, brg */,
+    SPICE_BITMAP_FMT_32BIT /* 4 byte, xrgb in little endian format */,
+    SPICE_BITMAP_FMT_RGBA /* 4 byte, argb in little endian format */,
 };
 
 enum {
commit 32541ac87138b281ab2a0330855ef59a0eb69fd0
Author: Alexander Larsson <alexl at redhat.com>
Date:   Mon Apr 19 15:46:10 2010 +0200

    Add surface type enum
    
    This is used to specify how pixels map to colors in surfaces.

diff --git a/spice/draw.h b/spice/draw.h
index 075324b..2552fa0 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -148,6 +148,17 @@ typedef struct SPICE_ATTR_PACKED SpicePalette {
 } SpicePalette;
 
 enum {
+    SPICE_SURFACE_FMT_INVALID,
+    SPICE_SURFACE_FMT_1_A     = 1,
+    SPICE_SURFACE_FMT_8_A     = 8,
+    SPICE_SURFACE_FMT_16_555  = 16 + (0 << 6),
+    SPICE_SURFACE_FMT_16_565  = 16 + (1 << 6),
+    SPICE_SURFACE_FMT_32_xRGB = 32 + (0 << 6),
+    SPICE_SURFACE_FMT_32_ARGB = 32 + (1 << 6),
+};
+#define SPICE_SURFACE_FMT_DEPTH(_d) ((_d) & 0x3f)
+
+enum {
     SPICE_IMAGE_TYPE_BITMAP,
     SPICE_IMAGE_TYPE_QUIC,
     SPICE_IMAGE_TYPE_RESERVED,


More information about the Spice-commits mailing list