[Spice-devel] [PATCH] spice-protocl: add SPICE_MSG_DISPLAY_SURFACE_CREATE/DESTROY

Izik Eidus ieidus at redhat.com
Wed Feb 17 15:16:50 PST 2010


From 7a182d48ee603177d522edec9b189f2f6e3ee5a6 Mon Sep 17 00:00:00 2001
From: Izik Eidus <ieidus at redhat.com>
Date: Thu, 18 Feb 2010 01:13:56 +0200
Subject: [PATCH] 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>
---
 spice/protocol.h |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/spice/protocol.h b/spice/protocol.h
index 5f01a12..e0dbd32 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -339,8 +339,7 @@ typedef struct SPICE_ATTR_PACKED SpiceMsgcMainMouseModeRequest {
 } SpiceMsgcMainMouseModeRequest;
 
 enum {
-    SPICE_MSG_DISPLAY_MODE = SPICE_MSG_FIRST_AVAIL,
-    SPICE_MSG_DISPLAY_MARK,
+    SPICE_MSG_DISPLAY_MARK = SPICE_MSG_FIRST_AVAIL,
     SPICE_MSG_DISPLAY_RESET,
     SPICE_MSG_DISPLAY_COPY_BITS,
 
@@ -368,6 +367,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,
 };
 
@@ -389,7 +391,26 @@ 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;
+    int32_t stride;
+    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;
@@ -469,6 +490,7 @@ enum {
 };
 
 typedef struct SPICE_ATTR_PACKED SpiceMsgDisplayStreamCreate {
+    uint32_t surface_id;
     uint32_t id;
     uint32_t flags;
     uint32_t codec_type;
-- 
1.6.6.1



More information about the Spice-devel mailing list