summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-09-30 00:22:45 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-09-30 00:22:45 -0400
commitd0a146870c6d92c7a4a4e37828f15bf8a3d07d5a (patch)
treec46450955e4d43fdc4361b9f6acbb874d6238133
parentb8fe440b2fd4d91961fd3280a869a5acb7e1f38b (diff)
Misc bug fixes
-rw-r--r--src/cairo-pixman-surface.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/cairo-pixman-surface.c b/src/cairo-pixman-surface.c
index 00346e41..34549de5 100644
--- a/src/cairo-pixman-surface.c
+++ b/src/cairo-pixman-surface.c
@@ -456,6 +456,8 @@ pimage_from_surface_pattern (cairo_surface_pattern_t *pattern,
pixman_image_t *simage;
cairo_int_status_t status;
acquire_source_cleanup_t *info = NULL;
+
+ status = CAIRO_INT_STATUS_SUCCESS;
/* First, get a pixman image that has the right bits */
switch (pattern->surface->type)
@@ -1103,9 +1105,6 @@ clip_and_composite (cairo_pixman_surface_t *psurface,
if (status != CAIRO_INT_STATUS_SUCCESS)
goto out;
- if (!(status = pimage_from_pattern (psurface, source, &src_image)))
- goto out;
-
pop = _pixman_operator (operator);
if (pop == PIXMAN_OP_CLEAR)
@@ -1117,13 +1116,27 @@ clip_and_composite (cairo_pixman_surface_t *psurface,
clip_image, mask_image, dest_image,
0, 0, 0, 0, 0, 0, width, height);
}
- else
+ else if (mask_image)
{
pixman_image_composite32 (
PIXMAN_OP_OUT_REVERSE,
mask_image, NULL, dest_image,
0, 0, 0, 0, 0, 0, width, height);
}
+ else
+ {
+ if (!(combined = pixman_image_create_solid_fill (&white)))
+ {
+ status = CAIRO_INT_STATUS_NO_MEMORY;
+
+ goto out;
+ }
+
+ pixman_image_composite32 (
+ PIXMAN_OP_OUT_REVERSE,
+ combined, NULL, dest_image,
+ 0, 0, 0, 0, 0, 0, width, height);
+ }
}
else if (clip_image &&
(pop == PIXMAN_OP_IN ||