[cairo-commit] src/cairo-gl-glyphs.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jun 20 02:28:26 PDT 2012
src/cairo-gl-glyphs.c | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 185a3518968d5ca0babb798fe10f247171a1e001
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 20 09:15:29 2012 +0100
gl: Trim the glyph mask to the operation extents
In the case we try to use an unbounded operation, passing a NULL clip
causes that operation to clear the rest of the surface. Instead we need
to trim the _cairo_surface_mask() to the operation extents.
Fixes overlapping-glyphs.
Suggested-by: Chuanbo Weng <strgnm at gmail.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index c2660ac..e6267c0 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
@@ -386,11 +386,16 @@ render_glyphs_via_mask (cairo_gl_surface_t *dst,
cairo_matrix_init_translate (&source_pattern.base.matrix,
dst_x-info->extents.x, dst_y-info->extents.y);
+ clip = _cairo_clip_copy (clip);
+ clip = _cairo_clip_intersect_rectangle (clip, &info->extents);
+
status = _cairo_surface_mask (&dst->base, op,
&source_pattern.base,
&mask_pattern.base,
clip);
+ _cairo_clip_destroy (clip);
+
_cairo_pattern_fini (&mask_pattern.base);
_cairo_pattern_fini (&source_pattern.base);
}
More information about the cairo-commit
mailing list