1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/cairo/avoid-extend-none.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +changeset: 93076:25d0c8a38d7d 1.5 +tag: none 1.6 +tag: qbase 1.7 +tag: qtip 1.8 +tag: tip 1.9 +user: Jeff Muizelaar <jmuizelaar@mozilla.com> 1.10 +date: Thu May 03 15:21:52 2012 -0400 1.11 +summary: Bug 751668. Avoid incorrectly using EXTEND_NONE. r=joe 1.12 + 1.13 +diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c 1.14 +--- a/gfx/cairo/cairo/src/cairo-image-surface.c 1.15 ++++ b/gfx/cairo/cairo/src/cairo-image-surface.c 1.16 +@@ -1390,25 +1390,16 @@ static pixman_image_t * 1.17 + cairo_image_surface_t *source = (cairo_image_surface_t *) pattern->surface; 1.18 + cairo_surface_type_t type; 1.19 + 1.20 + if (source->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) 1.21 + source = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) pattern->surface)->target; 1.22 + 1.23 + type = source->base.backend->type; 1.24 + if (type == CAIRO_SURFACE_TYPE_IMAGE) { 1.25 +- if (extend != CAIRO_EXTEND_NONE && 1.26 +- sample.x >= 0 && 1.27 +- sample.y >= 0 && 1.28 +- sample.x + sample.width <= source->width && 1.29 +- sample.y + sample.height <= source->height) 1.30 +- { 1.31 +- extend = CAIRO_EXTEND_NONE; 1.32 +- } 1.33 +- 1.34 + if (sample.width == 1 && sample.height == 1) { 1.35 + if (sample.x < 0 || 1.36 + sample.y < 0 || 1.37 + sample.x >= source->width || 1.38 + sample.y >= source->height) 1.39 + { 1.40 + if (extend == CAIRO_EXTEND_NONE) 1.41 + return _pixman_transparent_image (); 1.42 +