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

Izik Eidus ieidus at redhat.com
Sat Feb 20 02:41:08 PST 2010


From 1c6666c544eefcea7d458424e6fce23da7506a35 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 |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/spice/protocol.h b/spice/protocol.h
index 5f01a12..f73e1f8 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -368,6 +368,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 +392,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;
@@ -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