[Spice-devel] [PATCH 04/10] Move pipe item enumerations out of red_worker.h
Frediano Ziglio
fziglio at redhat.com
Mon Nov 2 01:56:00 PST 2015
From: Marc-André Lureau <marcandre.lureau at gmail.com>
Move the cursor-specific pipe item types to cursor-channel.h, and the
display-specific types to red_worker.c. Only leave the common
definitions in red_worker.h. This prepares for splitting the display
channel into a separate file.
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
---
server/cursor-channel.h | 6 ++++++
server/red_worker.c | 17 +++++++++++++++++
server/red_worker.h | 21 +++------------------
3 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/server/cursor-channel.h b/server/cursor-channel.h
index f20001c..1639cf9 100644
--- a/server/cursor-channel.h
+++ b/server/cursor-channel.h
@@ -32,6 +32,12 @@
#define CURSOR_CACHE_HASH_MASK (CURSOR_CACHE_HASH_SIZE - 1)
#define CURSOR_CACHE_HASH_KEY(id) ((id) & CURSOR_CACHE_HASH_MASK)
+enum {
+ PIPE_ITEM_TYPE_CURSOR = PIPE_ITEM_TYPE_COMMON_LAST,
+ PIPE_ITEM_TYPE_CURSOR_INIT,
+ PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE,
+};
+
typedef struct CursorItem {
QXLInstance *qxl;
uint32_t group_id;
diff --git a/server/red_worker.c b/server/red_worker.c
index 93a305a..c3b5c36 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -228,6 +228,23 @@ struct SpiceWatch {
void *watch_func_opaque;
};
+enum {
+ PIPE_ITEM_TYPE_DRAW = PIPE_ITEM_TYPE_COMMON_LAST,
+ PIPE_ITEM_TYPE_IMAGE,
+ PIPE_ITEM_TYPE_STREAM_CREATE,
+ PIPE_ITEM_TYPE_STREAM_CLIP,
+ PIPE_ITEM_TYPE_STREAM_DESTROY,
+ PIPE_ITEM_TYPE_UPGRADE,
+ PIPE_ITEM_TYPE_MIGRATE_DATA,
+ PIPE_ITEM_TYPE_PIXMAP_SYNC,
+ PIPE_ITEM_TYPE_PIXMAP_RESET,
+ PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE,
+ PIPE_ITEM_TYPE_CREATE_SURFACE,
+ PIPE_ITEM_TYPE_DESTROY_SURFACE,
+ PIPE_ITEM_TYPE_MONITORS_CONFIG,
+ PIPE_ITEM_TYPE_STREAM_ACTIVATE_REPORT,
+};
+
#define MAX_LZ_ENCODERS MAX_CACHE_CLIENTS
typedef struct SurfaceCreateItem {
diff --git a/server/red_worker.h b/server/red_worker.h
index 76502b6..aa97707 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -48,25 +48,10 @@ typedef struct CommonChannel {
} CommonChannel;
enum {
- PIPE_ITEM_TYPE_DRAW = PIPE_ITEM_TYPE_CHANNEL_BASE,
+ PIPE_ITEM_TYPE_VERB = PIPE_ITEM_TYPE_CHANNEL_BASE,
PIPE_ITEM_TYPE_INVAL_ONE,
- PIPE_ITEM_TYPE_CURSOR,
- PIPE_ITEM_TYPE_CURSOR_INIT,
- PIPE_ITEM_TYPE_IMAGE,
- PIPE_ITEM_TYPE_STREAM_CREATE,
- PIPE_ITEM_TYPE_STREAM_CLIP,
- PIPE_ITEM_TYPE_STREAM_DESTROY,
- PIPE_ITEM_TYPE_UPGRADE,
- PIPE_ITEM_TYPE_VERB,
- PIPE_ITEM_TYPE_MIGRATE_DATA,
- PIPE_ITEM_TYPE_PIXMAP_SYNC,
- PIPE_ITEM_TYPE_PIXMAP_RESET,
- PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE,
- PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE,
- PIPE_ITEM_TYPE_CREATE_SURFACE,
- PIPE_ITEM_TYPE_DESTROY_SURFACE,
- PIPE_ITEM_TYPE_MONITORS_CONFIG,
- PIPE_ITEM_TYPE_STREAM_ACTIVATE_REPORT,
+
+ PIPE_ITEM_TYPE_COMMON_LAST
};
typedef struct VerbItem {
--
2.4.3
More information about the Spice-devel
mailing list