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

Izik Eidus izik at kemper.freedesktop.org
Fri Apr 2 19:46:58 PDT 2010


 spice/draw.h     |   10 ++++++++++
 spice/protocol.h |   22 ++++++++++++++++++++++
 spice/qxl_dev.h  |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)

New commits:
commit 98fd8921a9725db4b521346cbc320bb70dee0991
Author: Izik Eidus <ieidus at redhat.com>
Date:   Sat Apr 3 05:41:20 2010 +0300

    spice-protocol off screens supports
    
    Signed-off-by: Izik Eidus <ieidus at redhat.com>

diff --git a/spice/draw.h b/spice/draw.h
index 254e0b0..075324b 100644
--- a/spice/draw.h
+++ b/spice/draw.h
@@ -155,6 +155,7 @@ enum {
     SPICE_IMAGE_TYPE_LZ_RGB,
     SPICE_IMAGE_TYPE_GLZ_RGB,
     SPICE_IMAGE_TYPE_FROM_CACHE,
+    SPICE_IMAGE_TYPE_SURFACE,
 };
 
 enum {
@@ -203,6 +204,15 @@ typedef struct SPICE_ATTR_PACKED SpiceBitmapImage {
     SpiceBitmap bitmap;
 } SpiceBitmapImage;
 
+typedef struct SPICE_ATTR_PACKED SpiceSurface {
+    uint32_t surface_id;
+} SpiceSurface;
+
+typedef struct SPICE_ATTR_PACKED SpiceSurfaceImage {
+    SpiceImageDescriptor descriptor; //?
+    SpiceSurface surface;
+} SpiceSurfaceImage;
+
 typedef struct SPICE_ATTR_PACKED SpiceQUICData {
     uint32_t data_size;
     uint8_t data[0];
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 353018d..af9f30a 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -70,6 +70,7 @@ enum {
     QXL_IO_CREATE_PRIMARY,
     QXL_IO_DESTROY_PRIMARY,
     QXL_IO_DESTROY_SURFACE_WAIT,
+    QXL_IO_DESTROY_ALL_SURFACES,
 
     QXL_IO_RANGE_SIZE
 };
@@ -91,6 +92,7 @@ typedef struct SPICE_ATTR_PACKED QXLRom {
     uint8_t slot_gen_bits;
     uint8_t slot_id_bits;
     uint8_t slot_generation;
+    uint32_t n_surfaces;
 } QXLRom;
 
 typedef struct SPICE_ATTR_PACKED QXLMode {
@@ -118,6 +120,7 @@ enum QXLCmdType {
     QXL_CMD_UPDATE,
     QXL_CMD_CURSOR,
     QXL_CMD_MESSAGE,
+    QXL_CMD_SURFACE,
 };
 
 typedef struct SPICE_ATTR_PACKED QXLCommand {
@@ -169,6 +172,7 @@ typedef struct SPICE_ATTR_PACKED QXLRam {
     QXLCursorRing cursor_ring;
     QXLReleaseRing release_ring;
     SpiceRect update_area;
+    uint32_t update_surface;
     QXLMemSlot mem_slot;
     QXLSurfaceCreate create_surface;
     uint64_t flags;
@@ -200,6 +204,7 @@ typedef struct SPICE_ATTR_PACKED QXLUpdateCmd {
     QXLReleaseInfo release_info;
     SpiceRect area;
     uint32_t update_id;
+    uint32_t surface_id;
 } QXLUpdateCmd;
 
 typedef struct SPICE_ATTR_PACKED QXLCursor {
@@ -274,6 +279,7 @@ typedef struct SPICE_ATTR_PACKED QXLCopyBits {
 
 typedef struct SPICE_ATTR_PACKED QXLDrawable {
     QXLReleaseInfo release_info;
+    uint32_t surface_id;
     uint8_t effect;
     uint8_t type;
     uint8_t self_bitmap;
@@ -281,6 +287,8 @@ typedef struct SPICE_ATTR_PACKED QXLDrawable {
     SpiceRect bbox;
     SpiceClip clip;
     uint32_t mm_time;
+    int32_t surfaces_dest[3];
+    SpiceRect surfaces_rects[3];
     union {
         SpiceFill fill;
         SpiceOpaque opaque;
@@ -298,6 +306,29 @@ typedef struct SPICE_ATTR_PACKED QXLDrawable {
     } u;
 } QXLDrawable;
 
+enum QXLSurfaceCmdType {
+    QXL_SURFACE_CMD_CREATE,
+    QXL_SURFACE_CMD_DESTROY,
+};
+
+typedef struct SPICE_ATTR_PACKED QXLSurface {
+    uint8_t depth;
+    uint32_t width;
+    uint32_t height;
+    int32_t stride;
+    QXLPHYSICAL data;
+} QXLSurface;
+
+typedef struct SPICE_ATTR_PACKED QXLSurfaceCmd {
+    QXLReleaseInfo release_info;
+    uint32_t surface_id;
+    uint8_t type;
+    uint32_t flags;
+    union {
+        QXLSurface surface_create;
+    } u;
+} QXLSurfaceCmd;
+
 typedef struct SPICE_ATTR_PACKED QXLClipRects {
     uint32_t num_rects;
     QXLDataChunk chunk;
@@ -349,6 +380,7 @@ typedef struct SPICE_ATTR_PACKED QXLImage {
     union { // variable length
         SpiceBitmap bitmap;
         SpiceQUICData quic;
+        SpiceSurface surface_image;
     };
 } QXLImage;
 
commit 14db228e81db1831f353f8714691e57f5751ff1e
Author: Izik Eidus <ieidus at redhat.com>
Date:   Sat Apr 3 05:40:50 2010 +0300

    spice-protocl: add spice_msg_display_surface_create/destroy
    
    protocol commands to create/destroy surface on the client.
    
    i removed spice_msg_display_mode as it now not needed
    
    Signed-off-by: Izik Eidus <ieidus at redhat.com>

diff --git a/spice/protocol.h b/spice/protocol.h
index a0c5251..c63d1a1 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -379,6 +379,9 @@ enum {
     SPICE_MSG_DISPLAY_DRAW_TRANSPARENT,
     SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND,
 
+    SPICE_MSG_DISPLAY_SURFACE_CREATE,
+    SPICE_MSG_DISPLAY_SURFACE_DESTROY,
+
     SPICE_MSG_END_DISPLAY,
 };
 
@@ -400,7 +403,25 @@ typedef struct SPICE_ATTR_PACKED SpiceMsgDisplayMode {
     uint32_t bits;
 } SpiceMsgDisplayMode;
 
+enum {
+    SPICE_SURFACE_FLAGS_PRIMARY = (1 << 0),
+};
+
+typedef struct SPICE_ATTR_PACKED SpiceMsgSurfaceCreate {
+    uint32_t surface_id;
+    uint32_t width;
+    uint32_t height;
+    uint8_t depth;
+    uint32_t flags;
+    uint32_t type;
+} SpiceMsgSurfaceCreate;
+
+typedef struct SPICE_ATTR_PACKED SpiceMsgSurfaceDestroy {
+    uint32_t surface_id;
+} SpiceMsgSurfaceDestroy;
+
 typedef struct SPICE_ATTR_PACKED SpiceMsgDisplayBase {
+    uint32_t surface_id;
     SpiceRect box;
     SpiceClip clip;
 } SpiceMsgDisplayBase;
@@ -480,6 +501,7 @@ enum {
 };
 
 typedef struct SPICE_ATTR_PACKED SpiceMsgDisplayStreamCreate {
+    uint32_t surface_id;
     uint32_t id;
     uint32_t flags;
     uint32_t codec_type;


More information about the Spice-commits mailing list