[cairo-commit] src/cairo-scaled-font.c
M. Joonas Pihlaja
joonas at kemper.freedesktop.org
Sun Feb 21 16:36:12 PST 2010
src/cairo-scaled-font.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 75db4f0ece194b7aa0455509785a300784778ec4
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date: Mon Feb 22 02:26:47 2010 +0200
text: Fix assert failure from compositing by SOURCE with a mask internally.
Change the operator used to upgrade the format of a glyph mask from
CAIRO_OPERATOR_SOURCE to CAIRO_OPERATOR_ADD.
The _cairo_scaled_font_show_glyphs() function upgrades the pixel
format of a glyph mask by calling _cairo_surface_composite() to copy
the mask to an image surface of the upgraded destination. The way it
was doing it however was to use CAIRO_OPERATOR_SOURCE, a white source
pattern and the glyph's rasterised glyph as the mask pattern. This
combination isn't supported by _cairo_surface_composite(), which
asserts that no mask is present when the operator is SOURCE or CLEAR.
Reported by Mikael Magnusson to #cairo on irc.freenode.net.
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 7a556a7..480488f 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2163,7 +2163,7 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font,
/* Note that we only upgrade masks, i.e. A1 -> A8 -> ARGB32, so there is
* never any component alpha here.
*/
- status = _cairo_surface_composite (CAIRO_OPERATOR_SOURCE,
+ status = _cairo_surface_composite (CAIRO_OPERATOR_ADD,
&_cairo_pattern_white.base,
&mask_pattern.base,
new_mask,
More information about the cairo-commit
mailing list