[PATCH libXfont 1/2] Use one single function to register fpe functions
Alex Deucher
alexdeucher at gmail.com
Thu Jun 10 07:23:41 PDT 2010
On Thu, Jun 10, 2010 at 9:41 AM, Tiago Vignatti
<tiago.vignatti at nokia.com> wrote:
> X server doesn't need to understand fpe internals, so let it transparent
> turning all registration functions in a single one. For that, fill the already
> existent register_fpe_functions().
>
> Some X servers don't want font server support, so this patch also sets font
> server support to be configured in build time.
>
> In my machine, I see 20kB of RSS being saved in libXfont mapped in Xorg
> process when I disabled font server support and other kind of fonts in the
> library (--disable-pcfformat --disable-bdfformat --disable-snfformat
> --disable-freetype --disable-fc).
>
> The default library built was taking:
> text data bss dec hex filename
> 261847 4484 1536 267867 4165b ./lib/libXfont.so
>
> and with these flags, it jumps to:
> text data bss dec hex filename
> 157764 2428 1188 161380 27664 ./lib/libXfont.so
>
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
Seems sane to me. For the series:
Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
> ---
> src/util/miscutil.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/src/util/miscutil.c b/src/util/miscutil.c
> index 3459275..1e76b4b 100644
> --- a/src/util/miscutil.c
> +++ b/src/util/miscutil.c
> @@ -46,10 +46,17 @@ from The Open Group.
> #pragma weak register_fpe_functions
> #endif
>
> +extern void BuiltinRegisterFpeFunctions(void);
> +
> /* make sure everything initializes themselves at least once */
> weak long serverGeneration = 1;
>
> weak void
> register_fpe_functions (void)
> {
> + BuiltinRegisterFpeFunctions();
> + FontFileRegisterFpeFunctions();
> +#ifdef XFONT_FC
> + fs_register_fpe_functions();
> +#endif
> }
> --
> 1.7.1.226.g770c5
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
More information about the xorg-devel
mailing list