summaryrefslogtreecommitdiffstats
path: root/server/red_parse_qxl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-08-31 11:59:23 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-08-31 13:17:15 +0200
commit3ce690d58d9f21606ab4544cb174d75becd54371 (patch)
tree21f2aa8ce8f89695c67be105c59bf5032871b052 /server/red_parse_qxl.c
parent8bc4fe03446ddcb63d4576c643499480f429804c (diff)
downloadspice-3ce690d58d9f21606ab4544cb174d75becd54371.tar.gz
spice-3ce690d58d9f21606ab4544cb174d75becd54371.tar.xz
spice-3ce690d58d9f21606ab4544cb174d75becd54371.zip
qxl parser: complete parsing of QXLCompatDrawable structs
Diffstat (limited to 'server/red_parse_qxl.c')
-rw-r--r--server/red_parse_qxl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index e6e700bf..e0eba20f 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -820,6 +820,13 @@ void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
red->effect = qxl->effect;
red->mm_time = qxl->mm_time;
+ red->self_bitmap = (qxl->bitmap_offset != 0);
+ red_get_rect_ptr(&red->self_bitmap_area, &qxl->bitmap_area);
+
+ red->surfaces_dest[0] = -1;
+ red->surfaces_dest[1] = -1;
+ red->surfaces_dest[2] = -1;
+
red->type = qxl->type;
switch (red->type) {
case QXL_DRAW_ALPHA_BLEND:
@@ -837,6 +844,13 @@ void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
break;
case QXL_COPY_BITS:
red_get_point_ptr(&red->u.copy_bits.src_pos, &qxl->u.copy_bits.src_pos);
+ red->surfaces_dest[0] = 0;
+ red->surfaces_rects[0].left = red->u.copy_bits.src_pos.x;
+ red->surfaces_rects[0].right = red->u.copy_bits.src_pos.x +
+ (red->bbox.right - red->bbox.left);
+ red->surfaces_rects[0].top = red->u.copy_bits.src_pos.y;
+ red->surfaces_rects[0].bottom = red->u.copy_bits.src_pos.y +
+ (red->bbox.bottom - red->bbox.top);
break;
case QXL_DRAW_FILL:
red_get_fill_ptr(slots, group_id, &red->u.fill, &qxl->u.fill);