summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2013-08-03 14:24:29 +0200
committerAlon Levy <alevy@redhat.com>2013-08-03 14:49:43 +0200
commit457019ef8e45c73718ea6fb453fce2a2f6fe4530 (patch)
tree866b91ab58740752152130ec73b32972357b3c93
parent7be0e88e7e03a956b364cc847aad11b96ed47273 (diff)
protocol.h: add capability for shared memory in display channel
The new protocol is an extension optionally supported by the client if setting this capability bit. It works like this: Both server and client advertise this feature. If the server sees the client supports it, it will send as a first message when the display client channel is created MSG_DISPLAY_SHM_OFFER client replies with MSGC_DISPLAY_SHM_REPLY - accepted = 0 - nothing changes, return to normal behavior - accepted = 1 - shared memory behavior commences as described below. In shared memory mode: 1. every message read from the qxl device (via the qxl interface interface_get_command) is: 1.1 immediately rendered into the framebuffer * since the framebuffer is a shared memory segment, the client can immediately use it. It is expected to use a shared memory pixmap (pixbuf?) to avoid another copy. 1.2 server will send a MSG_DISPLAY_SHM_DAMAGE message with the clips buffer from the render command 2. no offscreen surfaces will ever be sent 3. all messages creating/destroying the primary surface (i.e. resolution changes) will be sent as usual 4. the cursor channel is unaffected (future possible optimization). 5. all compression will be disabled (so avoid even the initialization and required memory allocation).
-rw-r--r--spice/protocol.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/spice/protocol.h b/spice/protocol.h
index e11f384..cc69892 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -131,6 +131,7 @@ enum {
SPICE_DISPLAY_CAP_COMPOSITE,
SPICE_DISPLAY_CAP_A8_SURFACE,
SPICE_DISPLAY_CAP_STREAM_REPORT,
+ SPICE_DISPLAY_CAP_SHARED_MEMORY,
};
enum {