mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 04:58:04 +02:00
image: Remove dubious "optimisations" for acquired source images
By this point we have already paid the penalty for acquiring the source image, so kiss. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c52129feb4
commit
1fe16f75b1
1 changed files with 0 additions and 29 deletions
|
|
@ -855,35 +855,6 @@ _pixman_image_for_surface (cairo_image_surface_t *dst,
|
|||
if (unlikely (status))
|
||||
return NULL;
|
||||
|
||||
if (sample->x >= 0 && sample->y >= 0 &&
|
||||
sample->x + sample->width <= image->width &&
|
||||
sample->y + sample->height <= image->height)
|
||||
{
|
||||
extend = CAIRO_EXTEND_NONE;
|
||||
}
|
||||
|
||||
if (sample->width == 1 && sample->height == 1) {
|
||||
if (sample->x < 0 ||
|
||||
sample->y < 0 ||
|
||||
sample->x >= image->width ||
|
||||
sample->y >= image->height)
|
||||
{
|
||||
if (extend == CAIRO_EXTEND_NONE) {
|
||||
pixman_image = _pixman_transparent_image ();
|
||||
_cairo_surface_release_source_image (pattern->surface, image, extra);
|
||||
return pixman_image;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pixman_image = _pixel_to_solid (image, sample->x, sample->y);
|
||||
if (pixman_image) {
|
||||
_cairo_surface_release_source_image (pattern->surface, image, extra);
|
||||
return pixman_image;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pixman_image = pixman_image_create_bits (image->pixman_format,
|
||||
image->width,
|
||||
image->height,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue