Fast paths should only run when the source images complete cover the
composite region, because otherwise they would be required to sample
the border, and fast paths generally don't know how to do that.
The check for this did not work right because it didn't take the
offset generated by the composite coordinates into account. This
commits fixes that by adding (x, y) coordinates to image cover
indicating the new position of the source in destination coordinates.
Based on this we now compare against the region extents which are
already in destination coordinates.
}
static inline pixman_bool_t
}
static inline pixman_bool_t
-image_covers (pixman_image_t *image, pixman_box32_t *extents)
+image_covers (pixman_image_t *image, pixman_box32_t *extents, int x, int y)
{
if (image->common.type == BITS && image->common.repeat == PIXMAN_REPEAT_NONE)
{
{
if (image->common.type == BITS && image->common.repeat == PIXMAN_REPEAT_NONE)
{
- if (extents->x1 < 0 || extents->y1 < 0 ||
- extents->x2 >= image->bits.width ||
- extents->y2 >= image->bits.height)
+ if (x > extents->x1 || y > extents->y1 ||
+ x + image->bits.width < extents->x2 ||
+ y + image->bits.height < extents->y2)
®ion, src, mask, dest, src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height))
{
pixman_box32_t *extents = pixman_region32_extents (®ion);
®ion, src, mask, dest, src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height))
{
pixman_box32_t *extents = pixman_region32_extents (®ion);
-
- if (image_covers (src, extents) &&
- (!mask || image_covers (mask, extents)))
+
+ if (image_covers (src, extents, dest_x - src_x, dest_y - src_y) &&
+ (!mask || image_covers (mask, extents, dest_x - mask_x, dest_y - mask_y)))
{
walk_region_internal (imp, op,
src, mask, dest,
{
walk_region_internal (imp, op,
src, mask, dest,