summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-07-25 13:04:49 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-08-23 17:34:32 -0400
commitdb8cdc85c54cc80f17ceba41194591f1172ca8f0 (patch)
tree126ccbb6d6894c1b77d39ac673951bbbd74d93f0
parent1e4dc1ae9a77e62bbfe99651de3abf1493b14393 (diff)
Beginning of image_from_picture
-rw-r--r--src/qxl_surface.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index c5cb40e..72fa3e5 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -1400,8 +1400,16 @@ qxl_surface_prepare_composite (int op,
}
static QXLImage *
-image_from_picture (qxl_screen_t *qxl, PicturePtr picture)
+image_from_picture (qxl_screen_t *qxl, PicturePtr picture, qxl_surface_t *surface)
{
+ struct QXLImage *image = qxl_allocnf (qxl, sizeof *image);
+
+ image->descriptor.id = 0;
+ image->descriptor.type = SPICE_IMAGE_TYPE_SURFACE;
+ image->descriptor.width = 0;
+ image->descriptor.height = 0;
+ image->surface_image.surface_id = surface->id;
+
/* FIXME */
return NULL;
}
@@ -1437,7 +1445,9 @@ qxl_surface_composite (qxl_surface_t *dest,
{
qxl_screen_t *qxl = dest->cache->qxl;
PicturePtr src = dest->u.composite.src_picture;
+ qxl_surface_t *qsrc = dest->u.composite.src;
PicturePtr mask = dest->u.composite.mask_picture;
+ qxl_surface_t *qmask = dest->u.composite.mask;
int op = dest->u.composite.op;
struct QXLDrawable *drawable;
QXLComposite *composite;
@@ -1456,14 +1466,14 @@ qxl_surface_composite (qxl_surface_t *dest,
composite->flags |= (op & 0xff);
- composite->src = image_from_picture (qxl, src);
+ composite->src = image_from_picture (qxl, src, qsrc);
composite->flags |= (src->filter << 8);
composite->flags |= (src->repeat << 14);
composite->src_transform = get_transform (qxl, src->transform);
if (mask)
{
- composite->mask = image_from_picture (qxl, mask);
+ composite->mask = image_from_picture (qxl, mask, qmask);
composite->flags |= (mask->filter << 11);
composite->flags |= (mask->repeat << 16);
composite->flags |= (mask->componentAlpha << 18);