summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pixman/pixman.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/pixman/pixman.c b/pixman/pixman.c
index 7ac8fcd4..07659d34 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -477,15 +477,14 @@ walk_region_internal (pixman_implementation_t *imp,
static force_inline pixman_bool_t
image_covers (pixman_image_t *image,
pixman_box32_t *extents,
- int x,
- int y)
+ int dx,
+ int dy)
{
if (image->common.type == BITS &&
image->common.repeat == PIXMAN_REPEAT_NONE)
{
- if (x > extents->x1 || y > extents->y1 ||
- x + image->bits.width < extents->x2 ||
- y + image->bits.height < extents->y2)
+ if (extents->x1 + dx < 0 || extents->x2 + dx > image->bits.width ||
+ extents->y1 + dy < 0 || extents->y2 + dy > image->bits.height)
{
return FALSE;
}
@@ -672,10 +671,10 @@ do_composite (pixman_implementation_t *imp,
extents = pixman_region32_extents (&region);
- if (image_covers (src, extents, dest_x - src_x, dest_y - src_y))
+ if (image_covers (src, extents, src_x - dest_x, src_y - dest_y))
src_flags |= FAST_PATH_COVERS_CLIP;
- if (mask && image_covers (mask, extents, dest_x - mask_x, dest_y - mask_y))
+ if (mask && image_covers (mask, extents, mask_x - dest_x, mask_y - dest_y))
mask_flags |= FAST_PATH_COVERS_CLIP;
/*