diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-30 13:23:18 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-30 13:23:18 -0400 |
commit | 60717697a4a13184db28d192b8f46d3caad41847 (patch) | |
tree | fef7607999080c35499ccf1b172dda2732baa148 | |
parent | d0a146870c6d92c7a4a4e37828f15bf8a3d07d5a (diff) |
More bug fixes
-rw-r--r-- | src/cairo-pixman-surface.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/cairo-pixman-surface.c b/src/cairo-pixman-surface.c index 34549de5..757d2353 100644 --- a/src/cairo-pixman-surface.c +++ b/src/cairo-pixman-surface.c @@ -853,7 +853,8 @@ traps_to_pixman_trapezoids (const cairo_traps_t *traps) } static cairo_int_status_t -create_clip_image (const cairo_clip_t *clip, pixman_image_t **clip_image) +create_clip_image (const cairo_clip_t *clip, int width, int height, + pixman_image_t **clip_image) { cairo_int_status_t status; pixman_trapezoid_t *ptraps = NULL; @@ -869,8 +870,7 @@ create_clip_image (const cairo_clip_t *clip, pixman_image_t **clip_image) goto out; } else if (!(*clip_image = pixman_image_create_bits ( - PIXMAN_a8, clip->extents.width, clip->extents.height, - NULL, -1))) + PIXMAN_a8, width, height, NULL, -1))) { status = CAIRO_INT_STATUS_NO_MEMORY; goto out; @@ -1042,12 +1042,11 @@ combine_mask_and_clip (pixman_image_t *mask_image, pixman_image_t *clip_image, { if (mask_image && clip_image) { - int width = pixman_image_get_width (mask_image); - int height = pixman_image_get_height (mask_image); - + int width = pixman_image_get_width (clip_image); + int height = pixman_image_get_height (clip_image); + if (!(*combined = pixman_image_create_bits ( - pixman_image_get_format (mask_image), - width, height, NULL, -1))) + PIXMAN_a8r8g8b8, width, height, NULL, -1))) { return CAIRO_INT_STATUS_NO_MEMORY; } @@ -1097,7 +1096,7 @@ clip_and_composite (cairo_pixman_surface_t *psurface, if (clip && _cairo_clip_is_all_clipped (clip)) goto out; - status = create_clip_image (clip, &clip_image); + status = create_clip_image (clip, width, height, &clip_image); if (status != CAIRO_INT_STATUS_SUCCESS) goto out; |