Bug 624198 - Crash due to missing cairo_clip_init call in cairo_gstate_show_text_glyphs. r=vlad a=jst

This commit is contained in:
Mats Palmgren 2011-01-21 04:26:39 +01:00
parent 73f18e6ec6
commit f7f0158774
3 changed files with 24 additions and 0 deletions

View File

@ -162,6 +162,8 @@ tee-surfaces-pointwise.patch: Composite tee subsurfaces pointwise if possible
pattern_get_surface-no-error.patch: Don't put a pattern into error if cairo_pattern_get_surface fails
missing-cairo-clip-init.diff: Missing cairo_clip_init call in cairo_gstate_show_text_glyphs lead to crash
==== pixman patches ====
pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv.

View File

@ -1846,6 +1846,7 @@ _cairo_gstate_show_text_glyphs (cairo_gstate_t *gstate,
goto CLEANUP_GLYPHS;
_cairo_gstate_copy_transformed_source (gstate, &source_pattern.base);
_cairo_clip_init(&clip);
/* For really huge font sizes, we can just do path;fill instead of
* show_glyphs, as show_glyphs would put excess pressure on the cache,

View File

@ -0,0 +1,21 @@
diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
--- a/gfx/cairo/cairo/src/cairo-gstate.c
+++ b/gfx/cairo/cairo/src/cairo-gstate.c
@@ -1841,16 +1841,17 @@ _cairo_gstate_show_text_glyphs (cairo_gs
transformed_glyphs,
&num_glyphs,
transformed_clusters);
if (status || num_glyphs == 0)
goto CLEANUP_GLYPHS;
_cairo_gstate_copy_transformed_source (gstate, &source_pattern.base);
+ _cairo_clip_init(&clip);
/* For really huge font sizes, we can just do path;fill instead of
* show_glyphs, as show_glyphs would put excess pressure on the cache,
* not all components below us correctly handle huge font sizes, and
* path filling can be cheaper since parts of glyphs are likely to be
* clipped out. 256 seems like a good limit. But alas, seems like cairo's
* rasterizer is something like ten times slower than freetype's for huge
* sizes. So, no win just yet when we're using cairo's rasterizer.