diff --git a/gfx/cairo/README b/gfx/cairo/README index 1147e980773e..47a3eaf20e4a 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -178,6 +178,8 @@ expose-snapshot.patch: Make functions to add snapshots public, as well as allow fix-build-with-Werror=return-type.patch: Fix builds with -Werror=return-type (bug 737909) +avoid-extend-none.patch: Avoid incorrectly using EXTEND_NONE (bug 751668) + ==== pixman patches ==== pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv. diff --git a/gfx/cairo/avoid-extend-none.patch b/gfx/cairo/avoid-extend-none.patch new file mode 100644 index 000000000000..b3606cc2e0d3 --- /dev/null +++ b/gfx/cairo/avoid-extend-none.patch @@ -0,0 +1,39 @@ +changeset: 93076:25d0c8a38d7d +tag: none +tag: qbase +tag: qtip +tag: tip +user: Jeff Muizelaar +date: Thu May 03 15:21:52 2012 -0400 +summary: Bug 751668. Avoid incorrectly using EXTEND_NONE. r=joe + +diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c +--- a/gfx/cairo/cairo/src/cairo-image-surface.c ++++ b/gfx/cairo/cairo/src/cairo-image-surface.c +@@ -1390,25 +1390,16 @@ static pixman_image_t * + cairo_image_surface_t *source = (cairo_image_surface_t *) pattern->surface; + cairo_surface_type_t type; + + if (source->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) + source = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) pattern->surface)->target; + + type = source->base.backend->type; + if (type == CAIRO_SURFACE_TYPE_IMAGE) { +- if (extend != CAIRO_EXTEND_NONE && +- sample.x >= 0 && +- sample.y >= 0 && +- sample.x + sample.width <= source->width && +- sample.y + sample.height <= source->height) +- { +- extend = CAIRO_EXTEND_NONE; +- } +- + if (sample.width == 1 && sample.height == 1) { + if (sample.x < 0 || + sample.y < 0 || + sample.x >= source->width || + sample.y >= source->height) + { + if (extend == CAIRO_EXTEND_NONE) + return _pixman_transparent_image (); + diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c index 57548322a38c..57fc9f0c89e6 100644 --- a/gfx/cairo/cairo/src/cairo-image-surface.c +++ b/gfx/cairo/cairo/src/cairo-image-surface.c @@ -1395,15 +1395,6 @@ _pixman_image_for_surface (const cairo_surface_pattern_t *pattern, type = source->base.backend->type; if (type == CAIRO_SURFACE_TYPE_IMAGE) { - if (extend != CAIRO_EXTEND_NONE && - sample.x >= 0 && - sample.y >= 0 && - sample.x + sample.width <= source->width && - sample.y + sample.height <= source->height) - { - extend = CAIRO_EXTEND_NONE; - } - if (sample.width == 1 && sample.height == 1) { if (sample.x < 0 || sample.y < 0 ||