diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-06-18 16:04:01 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-08-22 10:58:17 -0400 |
commit | 473a14b39fd7568e50456c61c95d89c742427ca1 (patch) | |
tree | 0a35929916f6461a50661ea5f74f5ad9da8183b2 /spice/enums.h | |
parent | 1d65b9016fbc26878f021227cebd6f8707ea6171 (diff) | |
download | spice-protocol-473a14b39fd7568e50456c61c95d89c742427ca1.tar.gz spice-protocol-473a14b39fd7568e50456c61c95d89c742427ca1.tar.xz spice-protocol-473a14b39fd7568e50456c61c95d89c742427ca1.zip |
Add support for QXLComposite to the Spice protocol headers
This new command is intended to be used for implementing the Composite
request from the Render X extension. See
http://www.x.org/releases/current/doc/renderproto/renderproto.txt
for a description of the Render extension.
Composite has three fields: src, mask and destination, of which mask
is optional (can be NULL). There are also two pointers to
transformations, one for each of src and mask.
The command also has 32 bits of flags which indicates
- which compositing operator to use
- which filters to apply when sampling source and mask
- which repeat mode to apply when sampling source and mask
- whether the mask should be considered to have 'component alpha'
- whether the alpha channel of any of the images should be ignored.
The last one of these features is necessary because in the X protocol
an offscreen surface is simply a collection of bits with no visual
interpretation. In order for Render to use these bits, a wrapper
object is used that contains the pixel format. Since one offscreen
surface can be wrapped by multple objects, there is not a one-to-one
correspondence between pixel formats and surfaces.
In SPICE surfaces do have an associated pixel format, which means the
above feature of Render cannot be supported without adding a similar
concept to the wrapper object to the SPICE protocol. However, the most
common use for having multiple wrappers for one offscreen surface is
to interpret an alpha surface as not having an alpha channel or vice
versa.
Diffstat (limited to 'spice/enums.h')
-rw-r--r-- | spice/enums.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spice/enums.h b/spice/enums.h index 7cdea0f..7691dd3 100644 --- a/spice/enums.h +++ b/spice/enums.h @@ -38,6 +38,36 @@ typedef enum SpiceMigrateFlags { SPICE_MIGRATE_FLAGS_MASK = 0x3 } SpiceMigrateFlags; +typedef enum SpiceCompositeFlags { + SPICE_COMPOSITE_OP0 = (1 << 0), + SPICE_COMPOSITE_OP1 = (1 << 1), + SPICE_COMPOSITE_OP2 = (1 << 2), + SPICE_COMPOSITE_OP3 = (1 << 3), + SPICE_COMPOSITE_OP4 = (1 << 4), + SPICE_COMPOSITE_OP5 = (1 << 5), + SPICE_COMPOSITE_OP6 = (1 << 6), + SPICE_COMPOSITE_OP7 = (1 << 7), + SPICE_COMPOSITE_SRC_FILTER0 = (1 << 8), + SPICE_COMPOSITE_SRC_FILTER1 = (1 << 9), + SPICE_COMPOSITE_SRC_FILTER2 = (1 << 10), + SPICE_COMPOSITE_MASK_FILTER0 = (1 << 11), + SPICE_COMPOSITE_MASK_FITLER1 = (1 << 12), + SPICE_COMPOSITE_MASK_FILTER2 = (1 << 13), + SPICE_COMPOSITE_SRC_REPEAT0 = (1 << 14), + SPICE_COMPOSITE_SRC_REPEAT1 = (1 << 15), + SPICE_COMPOSITE_MASK_REPEAT0 = (1 << 16), + SPICE_COMPOSITE_MASK_REPEAT1 = (1 << 17), + SPICE_COMPOSITE_COMPONENT_ALPHA = (1 << 18), + SPICE_COMPOSITE_HAS_MASK = (1 << 19), + SPICE_COMPOSITE_HAS_SRC_TRANSFORM = (1 << 20), + SPICE_COMPOSITE_HAS_MASK_TRANSFORM = (1 << 21), + SPICE_COMPOSITE_SOURCE_OPAQUE = (1 << 22), + SPICE_COMPOSITE_MASK_OPAQUE = (1 << 23), + SPICE_COMPOSITE_DEST_OPAQUE = (1 << 24), + + SPICE_COMPOSITE_FLAGS_MASK = 0x1ffffff +} SpiceCompositeFlags; + typedef enum SpiceNotifySeverity { SPICE_NOTIFY_SEVERITY_INFO, SPICE_NOTIFY_SEVERITY_WARN, @@ -432,6 +462,7 @@ enum { SPICE_MSG_DISPLAY_SURFACE_DESTROY, SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, SPICE_MSG_DISPLAY_MONITORS_CONFIG, + SPICE_MSG_DISPLAY_DRAW_COMPOSITE, SPICE_MSG_END_DISPLAY }; |