diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-09-07 11:00:08 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-09-14 10:41:49 +0200 |
commit | 4207c49fe2a628aaafd2ff7be12b1c6680bfe6d3 (patch) | |
tree | 99446e90efcc60cedc6c42528bbc8429f509f555 /server/red_parse_qxl.c | |
parent | 4efeef330249819189a7a99e2dc65d2b3bc2f17b (diff) | |
download | spice-4207c49fe2a628aaafd2ff7be12b1c6680bfe6d3.tar.gz spice-4207c49fe2a628aaafd2ff7be12b1c6680bfe6d3.tar.xz spice-4207c49fe2a628aaafd2ff7be12b1c6680bfe6d3.zip |
move command flags handling to the qxl parser
Pass through command flags to the qxl parser, so we can hide all
compat bits for spice 0.4 within the qxl parser.
Diffstat (limited to 'server/red_parse_qxl.c')
-rw-r--r-- | server/red_parse_qxl.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c index e0eba20f..adeadd63 100644 --- a/server/red_parse_qxl.c +++ b/server/red_parse_qxl.c @@ -734,8 +734,8 @@ static void red_put_clip(SpiceClip *red) } } -void red_get_drawable(RedMemSlotInfo *slots, int group_id, - RedDrawable *red, QXLPHYSICAL addr) +static void red_get_native_drawable(RedMemSlotInfo *slots, int group_id, + RedDrawable *red, QXLPHYSICAL addr, uint32_t flags) { QXLDrawable *qxl; int i; @@ -807,8 +807,8 @@ void red_get_drawable(RedMemSlotInfo *slots, int group_id, }; } -void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id, - RedDrawable *red, QXLPHYSICAL addr) +static void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id, + RedDrawable *red, QXLPHYSICAL addr, uint32_t flags) { QXLCompatDrawable *qxl; @@ -885,6 +885,16 @@ void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id, }; } +void red_get_drawable(RedMemSlotInfo *slots, int group_id, + RedDrawable *red, QXLPHYSICAL addr, uint32_t flags) +{ + if (flags & QXL_COMMAND_FLAG_COMPAT) { + red_get_compat_drawable(slots, group_id, red, addr, flags); + } else { + red_get_native_drawable(slots, group_id, red, addr, flags); + } +} + void red_put_drawable(RedDrawable *red) { red_put_clip(&red->clip); |