[cairo-commit] 2 commits - configure.ac util/cairo-trace
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Jul 11 08:07:40 PDT 2014
configure.ac | 2 ++
util/cairo-trace/trace.c | 21 +++++++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 312553af298692111928a9443b75a00bf46d2adb
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jul 11 11:05:43 2014 -0400
[trace] Don't print FC_CHARSET, FC_LANG, and FC_CAPABILITY
There are many more that can go, but these take the most bytes.
FC_CHARSET needs to go specially because I recently changed
its format in fontconfig. Ouch!
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index dc12123..4d34826 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -4331,13 +4331,24 @@ cairo_ft_font_face_create_for_pattern (FcPattern *pattern)
obj = _get_object (FONT_FACE, ret);
if (obj->unknown) {
- FcChar8 *parsed;
+ FcPattern *copy;
+ FcChar8 *unparsed;
- parsed = DLCALL (FcNameUnparse, pattern);
+ copy = DLCALL (FcPatternDuplicate, pattern);
+ if (copy)
+ {
+ DLCALL (FcPatternDel, copy, FC_LANG);
+ DLCALL (FcPatternDel, copy, FC_CHARSET);
+ DLCALL (FcPatternDel, copy, FC_CAPABILITY);
+ }
+ else
+ copy = pattern;
+
+ unparsed = DLCALL (FcNameUnparse, copy);
_trace_printf ("dict\n"
" /type 42 set\n"
" /pattern ");
- _emit_string_literal ((char *) parsed, -1);
+ _emit_string_literal ((char *) unparsed, -1);
_trace_printf (" set\n"
" font %% f%ld\n",
font_face_id);
@@ -4345,7 +4356,9 @@ cairo_ft_font_face_create_for_pattern (FcPattern *pattern)
_push_operand (FONT_FACE, ret);
dump_stack(__func__);
- free (parsed);
+ if (copy != pattern)
+ DLCALL (FcPatternDestroy, copy);
+ free (unparsed);
}
_write_unlock ();
}
commit 4cb220773d4babe216afae1198bb192956ffeae9
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jul 11 10:58:14 2014 -0400
chmod a+x cairo-trace
diff --git a/configure.ac b/configure.ac
index 04479ff..4fdd2fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -865,6 +865,8 @@ util/cairo-trace/cairo-trace
doc/Makefile
doc/public/Makefile
])
+AC_CONFIG_COMMANDS([cairo-trace],
+ [chmod a+x util/cairo-trace/cairo-trace])
AC_OUTPUT
CAIRO_REPORT
More information about the cairo-commit
mailing list