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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/cairo/xlib-glyph-clip-region.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
     1.5 +--- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
     1.6 ++++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
     1.7 +@@ -4806,30 +4806,30 @@ static cairo_int_status_t
     1.8 +     }
     1.9 + 
    1.10 +     X_DEBUG ((display->display, "show_glyphs (dst=%x)", (unsigned int) dst->drawable));
    1.11 + 
    1.12 +     if (clip_region != NULL &&
    1.13 + 	cairo_region_num_rectangles (clip_region) == 1)
    1.14 +     {
    1.15 + 	cairo_rectangle_int_t glyph_extents;
    1.16 +-	const cairo_rectangle_int_t *clip_extents;
    1.17 ++	cairo_rectangle_int_t clip_extents;
    1.18 + 
    1.19 + 	/* Can we do without the clip?
    1.20 + 	 * Around 50% of the time the clip is redundant (firefox).
    1.21 + 	 */
    1.22 + 	_cairo_scaled_font_glyph_approximate_extents (scaled_font,
    1.23 + 						      glyphs, num_glyphs,
    1.24 + 						      &glyph_extents);
    1.25 + 
    1.26 +-	clip_extents = &clip->path->extents;
    1.27 +-	if (clip_extents->x <= glyph_extents.x &&
    1.28 +-	    clip_extents->y <= glyph_extents.y &&
    1.29 +-	    clip_extents->x + clip_extents->width  >= glyph_extents.x + glyph_extents.width &&
    1.30 +-	    clip_extents->y + clip_extents->height >= glyph_extents.y + glyph_extents.height)
    1.31 ++	cairo_region_get_extents(clip_region, &clip_extents);
    1.32 ++	if (clip_extents.x <= glyph_extents.x &&
    1.33 ++	    clip_extents.y <= glyph_extents.y &&
    1.34 ++	    clip_extents.x + clip_extents.width  >= glyph_extents.x + glyph_extents.width &&
    1.35 ++	    clip_extents.y + clip_extents.height >= glyph_extents.y + glyph_extents.height)
    1.36 + 	{
    1.37 + 	    clip_region = NULL;
    1.38 + 	}
    1.39 +     }
    1.40 + 
    1.41 +     status = _cairo_xlib_surface_set_clip_region (dst, clip_region);
    1.42 +     if (unlikely (status))
    1.43 +         goto BAIL0;

mercurial