Bug 1744524: part 2) Add `WindowContext::GetUserGestureStart` and remove `WindowConte...
[gecko.git] / gfx / cairo / avoid-extend-none.patch
blobb3606cc2e0d3f736e9935fd07a700a76409a638e
1 changeset: 93076:25d0c8a38d7d
2 tag: none
3 tag: qbase
4 tag: qtip
5 tag: tip
6 user: Jeff Muizelaar <jmuizelaar@mozilla.com>
7 date: Thu May 03 15:21:52 2012 -0400
8 summary: Bug 751668. Avoid incorrectly using EXTEND_NONE. r=joe
10 diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
11 --- a/gfx/cairo/cairo/src/cairo-image-surface.c
12 +++ b/gfx/cairo/cairo/src/cairo-image-surface.c
13 @@ -1390,25 +1390,16 @@ static pixman_image_t *
14 cairo_image_surface_t *source = (cairo_image_surface_t *) pattern->surface;
15 cairo_surface_type_t type;
17 if (source->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT)
18 source = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) pattern->surface)->target;
20 type = source->base.backend->type;
21 if (type == CAIRO_SURFACE_TYPE_IMAGE) {
22 - if (extend != CAIRO_EXTEND_NONE &&
23 - sample.x >= 0 &&
24 - sample.y >= 0 &&
25 - sample.x + sample.width <= source->width &&
26 - sample.y + sample.height <= source->height)
27 - {
28 - extend = CAIRO_EXTEND_NONE;
29 - }
31 if (sample.width == 1 && sample.height == 1) {
32 if (sample.x < 0 ||
33 sample.y < 0 ||
34 sample.x >= source->width ||
35 sample.y >= source->height)
37 if (extend == CAIRO_EXTEND_NONE)
38 return _pixman_transparent_image ();