summaryrefslogtreecommitdiff
path: root/src/cairo-image-source.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-23 14:12:50 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-23 14:19:22 +0000
commit1fe16f75b1c7707949eaa9f5c34f908784990b60 (patch)
treed1898d8f310db3c38a4598267c445ff7d20ad5c6 /src/cairo-image-source.c
parentc52129feb429863f820928434185b6605dd4f1a6 (diff)
downloadcairo-1fe16f75b1c7707949eaa9f5c34f908784990b60.tar.gz
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>
Diffstat (limited to 'src/cairo-image-source.c')
-rw-r--r--src/cairo-image-source.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/cairo-image-source.c b/src/cairo-image-source.c
index 646c20afc..cdf9a7f78 100644
--- a/src/cairo-image-source.c
+++ b/src/cairo-image-source.c
@@ -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,