From 17b7625229384836d7a4a6a162fdc6b8503ef808 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Sat, 6 Dec 2008 12:08:45 +1300 Subject: [PATCH] b=467874 only destroy FT_Faces created by cairo. r=vlad --- gfx/cairo/README | 2 ++ gfx/cairo/cairo/src/cairo-ft-font.c | 3 ++- gfx/cairo/ft-done-face.patch | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 gfx/cairo/ft-done-face.patch diff --git a/gfx/cairo/README b/gfx/cairo/README index e234acad340..ecfef306979 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -36,6 +36,8 @@ qpainter-type.patch: add SURFACE_TYPE_QPAINTER to cairo.h wince-fixes.patch: stubs out win32 functions we use but are not supported on win32. Also implements ExtSelectClipRgn in terms of other functions available on wince. +ft-done-face.patch: bug 467874; only destroy FT_Faces created by cairo + ==== pixman patches ==== endian.patch: include cairo-platform.h for endian macros diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c index a6d2bd0860b..a22c88c467c 100644 --- a/gfx/cairo/cairo/src/cairo-ft-font.c +++ b/gfx/cairo/cairo/src/cairo-ft-font.c @@ -532,7 +532,8 @@ _has_unlocked_face (void *entry) { cairo_ft_unscaled_font_t *unscaled = entry; - return (unscaled->lock_count == 0 && unscaled->face); + return (unscaled->lock_count == 0 && + unscaled->face && !unscaled->from_face); } /* Ensures that an unscaled font has a face object. If we exceed diff --git a/gfx/cairo/ft-done-face.patch b/gfx/cairo/ft-done-face.patch new file mode 100644 index 00000000000..f2c4381e772 --- /dev/null +++ b/gfx/cairo/ft-done-face.patch @@ -0,0 +1,13 @@ +diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c +--- a/gfx/cairo/cairo/src/cairo-ft-font.c ++++ b/gfx/cairo/cairo/src/cairo-ft-font.c +@@ -532,7 +532,8 @@ _has_unlocked_face (void *entry) + { + cairo_ft_unscaled_font_t *unscaled = entry; + +- return (unscaled->lock_count == 0 && unscaled->face); ++ return (unscaled->lock_count == 0 && ++ unscaled->face && !unscaled->from_face); + } + + /* Ensures that an unscaled font has a face object. If we exceed