[cairo-commit] src/cairo-gl-glyphs.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jun 26 02:15:11 PDT 2012
src/cairo-gl-glyphs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 1bdee6b1ad00a2e5916bffea71719977f37f1982
Author: Chuanbo Weng <strgnm at gmail.com>
Date: Tue Jun 26 08:02:35 2012 +0800
gl: Set correct operation extents.
The dst_x and dst_y should be considered when setting clip extents,
because they are not always be zero. (for example, in clip-operator.c)
diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index e6267c0..0139bd1 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
@@ -372,6 +372,7 @@ render_glyphs_via_mask (cairo_gl_surface_t *dst,
if (likely (status == CAIRO_STATUS_SUCCESS)) {
cairo_surface_pattern_t mask_pattern;
cairo_surface_pattern_t source_pattern;
+ cairo_rectangle_int_t clip_extents;
mask->is_clear = FALSE;
_cairo_pattern_init_for_surface (&mask_pattern, mask);
@@ -387,7 +388,11 @@ render_glyphs_via_mask (cairo_gl_surface_t *dst,
dst_x-info->extents.x, dst_y-info->extents.y);
clip = _cairo_clip_copy (clip);
- clip = _cairo_clip_intersect_rectangle (clip, &info->extents);
+ clip_extents.x = info->extents.x - dst_x;
+ clip_extents.y = info->extents.y - dst_y;
+ clip_extents.width = info->extents.width;
+ clip_extents.height = info->extents.height;
+ clip = _cairo_clip_intersect_rectangle (clip, &clip_extents);
status = _cairo_surface_mask (&dst->base, op,
&source_pattern.base,
More information about the cairo-commit
mailing list