[Spice-devel] [PATCH 4/6] qxl abi: parse QXLFill.
Gerd Hoffmann
kraxel at redhat.com
Wed Jun 23 04:03:45 PDT 2010
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
---
common/canvas_base.c | 2 +-
common/gl_canvas.c | 2 +-
server/red_parse_qxl.c | 12 ++++++++++--
server/red_worker.c | 2 +-
spice.proto | 2 +-
spice1.proto | 2 +-
6 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/common/canvas_base.c b/common/canvas_base.c
index 2b00f09..090556b 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -2203,7 +2203,7 @@ static void canvas_draw_fill(SpiceCanvas *spice_canvas, SpiceRect *bbox, SpiceCl
canvas_mask_pixman(canvas, &dest_region, &fill->mask,
bbox->left, bbox->top);
- rop = ropd_descriptor_to_rop(fill->rop_decriptor,
+ rop = ropd_descriptor_to_rop(fill->rop_descriptor,
ROP_INPUT_BRUSH,
ROP_INPUT_DEST);
diff --git a/common/gl_canvas.c b/common/gl_canvas.c
index 688b635..8fdf899 100644
--- a/common/gl_canvas.c
+++ b/common/gl_canvas.c
@@ -353,7 +353,7 @@ static void gl_canvas_draw_fill(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spic
set_clip(canvas, bbox, clip);
set_mask(canvas, &fill->mask, bbox->left, bbox->top);
set_brush(canvas, &fill->brush);
- set_op(canvas, fill->rop_decriptor);
+ set_op(canvas, fill->rop_descriptor);
SET_GLC_RECT(&rect, bbox);
glc_fill_rect(canvas->glc, &rect);
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index cbdbf72..7dad295 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -20,6 +20,14 @@
#include "red_memslots.h"
#include "red_parse_qxl.h"
+static void red_get_fill_ptr(RedMemSlotInfo *slots, int group_id,
+ SpiceFill *red, QXLFill *qxl)
+{
+ red->brush = qxl->brush;
+ red->rop_descriptor = qxl->rop_descriptor;
+ red->mask = qxl->mask;
+}
+
static void red_get_alpha_blend_ptr(RedMemSlotInfo *slots, int group_id,
SpiceAlphaBlnd *red, QXLAlphaBlnd *qxl)
{
@@ -75,7 +83,7 @@ void red_get_drawable(RedMemSlotInfo *slots, int group_id,
red->u.copy = qxl->u.copy;
break;
case QXL_DRAW_FILL:
- red->u.fill = qxl->u.fill;
+ red_get_fill_ptr(slots, group_id, &red->u.fill, &qxl->u.fill);
break;
case QXL_DRAW_INVERS:
red->u.invers = qxl->u.invers;
@@ -129,7 +137,7 @@ void red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
red->u.copy = qxl->u.copy;
break;
case QXL_DRAW_FILL:
- red->u.fill = qxl->u.fill;
+ red_get_fill_ptr(slots, group_id, &red->u.fill, &qxl->u.fill);
break;
case QXL_DRAW_INVERS:
red->u.invers = qxl->u.invers;
diff --git a/server/red_worker.c b/server/red_worker.c
index 55d69a4..a8f2e4b 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -7658,7 +7658,7 @@ static void red_lossy_send_qxl_draw_fill(RedWorker *worker,
BitmapData brush_bitmap_data;
uint16_t rop;
- rop = drawable->u.fill.rop_decriptor;
+ rop = drawable->u.fill.rop_descriptor;
dest_allowed_lossy = !((rop & SPICE_ROPD_OP_OR) ||
(rop & SPICE_ROPD_OP_AND) ||
diff --git a/spice.proto b/spice.proto
index dbd3dde..9f6fc98 100644
--- a/spice.proto
+++ b/spice.proto
@@ -656,7 +656,7 @@ channel DisplayChannel : BaseChannel {
DisplayBase base;
struct Fill {
Brush brush @outvar(brush);
- uint16 rop_decriptor;
+ uint16 rop_descriptor;
QMask mask @outvar(mask);
} data;
} draw_fill = 302;
diff --git a/spice1.proto b/spice1.proto
index 0efe74b..1613ffb 100644
--- a/spice1.proto
+++ b/spice1.proto
@@ -603,7 +603,7 @@ channel DisplayChannel : BaseChannel {
DisplayBase base;
struct Fill {
Brush brush @outvar(brush);
- uint16 rop_decriptor;
+ uint16 rop_descriptor;
QMask mask @outvar(mask);
} data;
} draw_fill = 302;
--
1.6.5.2
More information about the Spice-devel
mailing list