[Spice-devel] [RFC 1/2] add SPICE_SURFACE_FLAGS_TOP_DOWN

Alon Levy alevy at redhat.com
Tue Aug 13 11:33:03 PDT 2013


Set when the image is to be interpreted as lowest memory address being the top line rather then the usual bottom line:

normal case:

memory     | Y
address    |
-----------|------
M          | y0
M+stride   | y0+1
M+2*stride | y0+2

with TOP_DOWN set:

memory     | Y
address    |
-----------|------
M          | y0+2
M+stride   | y0+1
M+2*stride | y0

This is to be used by a client using the new shared memory capability. Because now the allocation of the primary surface will be controlled by the server rather then the client, the client can no longer choose which representation is preferable to it and must handle both possibilities. In particular, windows QXL driver and older linux qxl drivers choose the top down representation.
---
 spice/enums.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/spice/enums.h b/spice/enums.h
index 8c731e9..7be34eb 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -244,8 +244,9 @@ typedef enum SpiceStringFlags {
 
 typedef enum SpiceSurfaceFlags {
     SPICE_SURFACE_FLAGS_PRIMARY = (1 << 0),
+    SPICE_SURFACE_FLAGS_TOP_DOWN = (1 << 1),
 
-    SPICE_SURFACE_FLAGS_MASK = 0x1
+    SPICE_SURFACE_FLAGS_MASK = 0x3
 } SpiceSurfaceFlags;
 
 typedef enum SpiceSurfaceFmt {
-- 
1.8.3.1



More information about the Spice-devel mailing list