gfx/cairo/xlib-glyph-clip-region.patch

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:97f97452ddb6
1 diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
2 --- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
3 +++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
4 @@ -4806,30 +4806,30 @@ static cairo_int_status_t
5 }
6
7 X_DEBUG ((display->display, "show_glyphs (dst=%x)", (unsigned int) dst->drawable));
8
9 if (clip_region != NULL &&
10 cairo_region_num_rectangles (clip_region) == 1)
11 {
12 cairo_rectangle_int_t glyph_extents;
13 - const cairo_rectangle_int_t *clip_extents;
14 + cairo_rectangle_int_t clip_extents;
15
16 /* Can we do without the clip?
17 * Around 50% of the time the clip is redundant (firefox).
18 */
19 _cairo_scaled_font_glyph_approximate_extents (scaled_font,
20 glyphs, num_glyphs,
21 &glyph_extents);
22
23 - clip_extents = &clip->path->extents;
24 - if (clip_extents->x <= glyph_extents.x &&
25 - clip_extents->y <= glyph_extents.y &&
26 - clip_extents->x + clip_extents->width >= glyph_extents.x + glyph_extents.width &&
27 - clip_extents->y + clip_extents->height >= glyph_extents.y + glyph_extents.height)
28 + cairo_region_get_extents(clip_region, &clip_extents);
29 + if (clip_extents.x <= glyph_extents.x &&
30 + clip_extents.y <= glyph_extents.y &&
31 + clip_extents.x + clip_extents.width >= glyph_extents.x + glyph_extents.width &&
32 + clip_extents.y + clip_extents.height >= glyph_extents.y + glyph_extents.height)
33 {
34 clip_region = NULL;
35 }
36 }
37
38 status = _cairo_xlib_surface_set_clip_region (dst, clip_region);
39 if (unlikely (status))
40 goto BAIL0;

mercurial