summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-06-23 14:46:23 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-06-29 12:30:20 +0200
commite81c6ef7c4be264cf2c7497d2c927a4b7132590e (patch)
tree7e0ea020a81857d7e7666832b8db4696a0975f18
parent63e07be145ae32bacef6f4229619a4d82a9b29cb (diff)
qxl abi: parse QXLCopy + QXLBlend.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
-rw-r--r--common/canvas_base.c4
-rw-r--r--common/gl_canvas.c4
-rw-r--r--server/red_parse_qxl.c28
-rw-r--r--server/red_worker.c6
-rw-r--r--spice.proto4
-rw-r--r--spice1.proto4
6 files changed, 35 insertions, 15 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c
index debbd46..c5ab88a 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -2232,7 +2232,7 @@ static void canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, SpiceCl
canvas_mask_pixman(canvas, &dest_region, &copy->mask,
bbox->left, bbox->top);
- rop = ropd_descriptor_to_rop(copy->rop_decriptor,
+ rop = ropd_descriptor_to_rop(copy->rop_descriptor,
ROP_INPUT_SRC,
ROP_INPUT_DEST);
@@ -2573,7 +2573,7 @@ static void canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, SpiceC
canvas_mask_pixman(canvas, &dest_region, &blend->mask,
bbox->left, bbox->top);
- rop = ropd_descriptor_to_rop(blend->rop_decriptor,
+ rop = ropd_descriptor_to_rop(blend->rop_descriptor,
ROP_INPUT_SRC,
ROP_INPUT_DEST);
diff --git a/common/gl_canvas.c b/common/gl_canvas.c
index 1fe08ae..059bd04 100644
--- a/common/gl_canvas.c
+++ b/common/gl_canvas.c
@@ -364,7 +364,7 @@ static void gl_canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spic
set_clip(canvas, bbox, clip);
set_mask(canvas, &copy->mask, bbox->left, bbox->top);
- set_op(canvas, copy->rop_decriptor);
+ set_op(canvas, copy->rop_descriptor);
//todo: optimize get_image (use ogl conversion + remove unnecessary copy of 32bpp)
surface = canvas_get_image(&canvas->base, copy->src_bitmap, FALSE);
@@ -438,7 +438,7 @@ static void gl_canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi
set_clip(canvas, bbox, clip);
set_mask(canvas, &blend->mask, bbox->left, bbox->top);
- set_op(canvas, blend->rop_decriptor);
+ set_op(canvas, blend->rop_descriptor);
surface = canvas_get_image(&canvas->base, blend->src_bitmap, FALSE);
SET_GLC_RECT(&dest, bbox);
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index 8590ec7..efe624e 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -39,6 +39,26 @@ static void red_get_opaque_ptr(RedMemSlotInfo *slots, int group_id,
red->mask = qxl->mask;
}
+static void red_get_copy_ptr(RedMemSlotInfo *slots, int group_id,
+ SpiceCopy *red, QXLCopy *qxl)
+{
+ red->src_bitmap = qxl->src_bitmap;
+ red->src_area = qxl->src_area;
+ red->rop_descriptor = qxl->rop_descriptor;
+ red->scale_mode = qxl->scale_mode;
+ red->mask = qxl->mask;
+}
+
+static void red_get_blend_ptr(RedMemSlotInfo *slots, int group_id,
+ SpiceBlend *red, QXLBlend *qxl)
+{
+ red->src_bitmap = qxl->src_bitmap;
+ red->src_area = qxl->src_area;
+ red->rop_descriptor = qxl->rop_descriptor;
+ red->scale_mode = qxl->scale_mode;
+ red->mask = qxl->mask;
+}
+
static void red_get_alpha_blend_ptr(RedMemSlotInfo *slots, int group_id,
SpiceAlphaBlnd *red, QXLAlphaBlnd *qxl)
{
@@ -88,10 +108,10 @@ void red_get_drawable(RedMemSlotInfo *slots, int group_id,
red->u.blackness = qxl->u.blackness;
break;
case QXL_DRAW_BLEND:
- red->u.blend = qxl->u.blend;
+ red_get_blend_ptr(slots, group_id, &red->u.blend, &qxl->u.blend);
break;
case QXL_DRAW_COPY:
- red->u.copy = qxl->u.copy;
+ red_get_copy_ptr(slots, group_id, &red->u.copy, &qxl->u.copy);
break;
case QXL_COPY_BITS:
red->u.copy_bits = qxl->u.copy_bits;
@@ -151,10 +171,10 @@ void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
red->u.blackness = qxl->u.blackness;
break;
case QXL_DRAW_BLEND:
- red->u.blend = qxl->u.blend;
+ red_get_blend_ptr(slots, group_id, &red->u.blend, &qxl->u.blend);
break;
case QXL_DRAW_COPY:
- red->u.copy = qxl->u.copy;
+ red_get_copy_ptr(slots, group_id, &red->u.copy, &qxl->u.copy);
break;
case QXL_COPY_BITS:
red->u.copy_bits = qxl->u.copy_bits;
diff --git a/server/red_worker.c b/server/red_worker.c
index e253c50..72eba10 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -3550,7 +3550,7 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
if (drawable->tree_item.effect != QXL_EFFECT_OPAQUE ||
red_drawable->type != QXL_DRAW_COPY ||
- red_drawable->u.copy.rop_decriptor != SPICE_ROPD_OP_PUT) {
+ red_drawable->u.copy.rop_descriptor != SPICE_ROPD_OP_PUT) {
return;
}
@@ -9118,7 +9118,7 @@ static void red_send_image(DisplayChannel *display_channel, ImageItem *item)
copy.base.box.bottom = item->pos.y + bitmap.y;
copy.base.clip.type = SPICE_CLIP_TYPE_NONE;
copy.base.clip.data = 0;
- copy.data.rop_decriptor = SPICE_ROPD_OP_PUT;
+ copy.data.rop_descriptor = SPICE_ROPD_OP_PUT;
copy.data.src_area.left = 0;
copy.data.src_area.top = 0;
copy.data.src_area.right = bitmap.x;
@@ -9222,7 +9222,7 @@ static void red_display_send_upgrade(DisplayChannel *display_channel, UpgradeIte
red_drawable = item->drawable->red_drawable;
ASSERT(red_drawable->type == QXL_DRAW_COPY);
- ASSERT(red_drawable->u.copy.rop_decriptor == SPICE_ROPD_OP_PUT);
+ ASSERT(red_drawable->u.copy.rop_descriptor == SPICE_ROPD_OP_PUT);
ASSERT(red_drawable->u.copy.mask.bitmap == 0);
copy.base.surface_id = 0;
diff --git a/spice.proto b/spice.proto
index 38493a4..e1062eb 100644
--- a/spice.proto
+++ b/spice.proto
@@ -673,7 +673,7 @@ channel DisplayChannel : BaseChannel {
struct Copy {
Image *src_bitmap;
Rect src_area;
- ropd rop_decriptor;
+ ropd rop_descriptor;
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} data;
@@ -684,7 +684,7 @@ channel DisplayChannel : BaseChannel {
struct Blend {
Image *src_bitmap;
Rect src_area;
- ropd rop_decriptor;
+ ropd rop_descriptor;
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} @ctype(SpiceCopy) data;
diff --git a/spice1.proto b/spice1.proto
index a233ffc..98ffb49 100644
--- a/spice1.proto
+++ b/spice1.proto
@@ -622,7 +622,7 @@ channel DisplayChannel : BaseChannel {
struct Copy {
Image *src_bitmap;
Rect src_area;
- ropd rop_decriptor;
+ ropd rop_descriptor;
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} data;
@@ -633,7 +633,7 @@ channel DisplayChannel : BaseChannel {
struct Blend {
Image *src_bitmap;
Rect src_area;
- ropd rop_decriptor;
+ ropd rop_descriptor;
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} @ctype(SpiceCopy) data;