diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-06-23 17:50:15 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-06-29 12:30:20 +0200 |
commit | 4de61f2dd89a5f5f2372afd2f6e7575d911cf235 (patch) | |
tree | 444b5aaa3904f7866dc51e7476bd5ac092004ead | |
parent | 45ba74c79532480c0e1f98a0392c801368728295 (diff) | |
download | spice-4de61f2dd89a5f5f2372afd2f6e7575d911cf235.tar.gz spice-4de61f2dd89a5f5f2372afd2f6e7575d911cf235.tar.xz spice-4de61f2dd89a5f5f2372afd2f6e7575d911cf235.zip |
qxl abi: parse QXLBrush.
-rw-r--r-- | server/red_parse_qxl.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c index c6048f06..1bd19aaa 100644 --- a/server/red_parse_qxl.c +++ b/server/red_parse_qxl.c @@ -20,6 +20,20 @@ #include "red_memslots.h" #include "red_parse_qxl.h" +static void red_get_brush_ptr(RedMemSlotInfo *slots, int group_id, + SpiceBrush *red, QXLBrush *qxl) +{ + red->type = qxl->type; + switch (red->type) { + case SPICE_BRUSH_TYPE_SOLID: + red->u.color = qxl->u.color; + break; + case SPICE_BRUSH_TYPE_PATTERN: + red->u.pattern = qxl->u.pattern; + break; + } +} + static void red_get_qmask_ptr(RedMemSlotInfo *slots, int group_id, SpiceQMask *red, QXLQMask *qxl) { @@ -31,7 +45,7 @@ static void red_get_qmask_ptr(RedMemSlotInfo *slots, int group_id, static void red_get_fill_ptr(RedMemSlotInfo *slots, int group_id, SpiceFill *red, QXLFill *qxl) { - red->brush = qxl->brush; + red_get_brush_ptr(slots, group_id, &red->brush, &qxl->brush); red->rop_descriptor = qxl->rop_descriptor; red_get_qmask_ptr(slots, group_id, &red->mask, &qxl->mask); } @@ -41,7 +55,7 @@ static void red_get_opaque_ptr(RedMemSlotInfo *slots, int group_id, { red->src_bitmap = qxl->src_bitmap; red->src_area = qxl->src_area; - red->brush = qxl->brush; + red_get_brush_ptr(slots, group_id, &red->brush, &qxl->brush); red->rop_descriptor = qxl->rop_descriptor; red->scale_mode = qxl->scale_mode; red_get_qmask_ptr(slots, group_id, &red->mask, &qxl->mask); @@ -98,7 +112,7 @@ static void red_get_rop3_ptr(RedMemSlotInfo *slots, int group_id, { red->src_bitmap = qxl->src_bitmap; red->src_area = qxl->src_area; - red->brush = qxl->brush; + red_get_brush_ptr(slots, group_id, &red->brush, &qxl->brush); red->rop3 = qxl->rop3; red->scale_mode = qxl->scale_mode; red_get_qmask_ptr(slots, group_id, &red->mask, &qxl->mask); @@ -109,7 +123,7 @@ static void red_get_stroke_ptr(RedMemSlotInfo *slots, int group_id, { red->path = qxl->path; red->attr = qxl->attr; - red->brush = qxl->brush; + red_get_brush_ptr(slots, group_id, &red->brush, &qxl->brush); red->fore_mode = qxl->fore_mode; red->back_mode = qxl->back_mode; } @@ -119,8 +133,8 @@ static void red_get_text_ptr(RedMemSlotInfo *slots, int group_id, { red->str = qxl->str; red->back_area = qxl->back_area; - red->fore_brush = qxl->fore_brush; - red->back_brush = qxl->back_brush; + red_get_brush_ptr(slots, group_id, &red->fore_brush, &qxl->fore_brush); + red_get_brush_ptr(slots, group_id, &red->back_brush, &qxl->back_brush); red->fore_mode = qxl->fore_mode; red->back_mode = qxl->back_mode; } |