Add support for A8 images to the LZ routines

This format is needed to add Render support to the X driver, so we
need the ability to compress and decompress it.
This commit is contained in:
Søren Sandmann Pedersen 2012-05-18 17:01:29 -04:00
parent e85c454a1e
commit b3eba427bf

View File

@ -26,6 +26,15 @@ struct Rect {
int32 right;
};
struct Transform {
uint32 t00;
uint32 t01;
uint32 t02;
uint32 t10;
uint32 t11;
uint32 t12;
};
enum32 link_err {
OK,
ERROR,
@ -52,6 +61,28 @@ flags32 migrate_flags {
NEED_DATA_TRANSFER
} @prefix(SPICE_MIGRATE_);
flags32 composite_flags {
OP0, OP1, OP2, OP3, OP4, OP5, OP6, OP7,
SRC_FILTER0, SRC_FILTER1, SRC_FILTER2,
MASK_FILTER0, MASK_FITLER1, MASK_FILTER2,
SRC_REPEAT0, SRC_REPEAT1,
MASK_REPEAT0, MASK_REPEAT1,
COMPONENT_ALPHA,
HAS_MASK,
HAS_SRC_TRANSFORM,
HAS_MASK_TRANSFORM,
/* These are used to override the formats given in the images. For
* example, if the mask image has format a8r8g8b8, but MASK_OPAQUE
* is set, the image should be treated as if it were x8r8g8b8
*/
SOURCE_OPAQUE,
MASK_OPAQUE,
DEST_OPAQUE,
} @prefix(SPICE_COMPOSITE_);
enum32 notify_severity {
INFO,
WARN,
@ -321,7 +352,8 @@ enum8 bitmap_fmt {
16BIT, /* 0555 mode */
24BIT /* 3 byte, brg */,
32BIT /* 4 byte, xrgb in little endian format */,
RGBA /* 4 byte, argb in little endian format */
RGBA /* 4 byte, argb in little endian format */,
8BIT_A /* 1 byte, alpha */
};
flags8 bitmap_flags {
@ -814,6 +846,28 @@ channel DisplayChannel : BaseChannel {
Head heads[count] @end;
} monitors_config;
message {
DisplayBase base;
struct Composite {
composite_flags flags;
Image *src_bitmap;
switch (flags) {
case HAS_MASK:
Image *mask_bitmap;
} a @anon;
switch (flags) {
case HAS_SRC_TRANSFORM:
Transform src_transform;
} b @anon;
switch (flags) {
case HAS_MASK_TRANSFORM:
Transform mask_transform;
} c @anon;
Point16 src_origin;
Point16 mask_origin;
} data;
} draw_composite;
client:
message {
uint8 pixmap_cache_id;