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