[cairo] scaled_font fini & directfb

Chris Wilson chris at chris-wilson.co.uk
Sat Dec 26 01:01:38 PST 2009

On Fri, 25 Dec 2009 14:46:48 -0800, L A <l.thee.a at gmail.com> wrote:
> I am using cairo with the dfb backend. I have been having issues with
> the DFB. It is running out of video memory. I found out that there are
> unclaimed surfaces created by cairo scaled_fonts. It seems that
> scaled_fonts are saved in a font map and are never freed (even when
> scaled_font is gone). I understand the logic that they might be needed
> in the future. But I simply dont have enough resources. Since I have
> multiple cairo contexts in the system, I cannot call the
> cairo_debug_reset_static_data function either.  What do I do?

Wow, somebody who is actively using the dfb backend.


 1. Don't use the directfb backend, the only thing it can
    accelerate is unscaled blits and fills. Can you conclusively
    demonstrate that the dfb backend is any faster than just using an
    image surface and manually pushing and pulling pixels between dfb.

 2. Don't have multiple active cairo contexts. They are intended to be
    short-lived objects. Aim to have a single context for a single expose

 3. Use a more recent version of cairo which has a bounded global glyph
    cache, as opposed to a glyph cache per scaled font.

 4. Use an upcoming version of cairo and the dfb backend may have become

As the last known user of the directfb backend, can you justify its
Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list