[cairo] Cairo vs. Xft glyph rendering

Xan Lopez xan.lopez at gmail.com
Fri Dec 8 07:32:34 PST 2006

On 12/8/06, Vladimir Vukicevic <vladimir at pobox.com> wrote:
> The main reason is that for XftGlyphSpecRender only a destination origin
> point and an array of glyph indicies is given.  For cairo's show_glyphs,
> each glyph has its own x/y coordinate.  So, one element in the call to
> Render per glyph is used.  Cairo could probably generate better runs by
> comparing the x/y delta from the previous glyph with the cached glyph
> offsets, but that data currently isn't available in the functions used
> and would require a hash lookup per glyph.
> Maybe one of the X folks here could let us know whether doing this could
> result in a performance gain?  (...)

Well, I've made a *very crude* hack which completely ignores each
glyph coordinates but makes the function call in a "sane" way (i.e.,
the xtrace output was the same than GTK 2.6's) and the performance win
is huge. Close to 25% improvement for GtkTextView and in timetext I
was actually passing GTK+ 2.6 in raw labels/second numbers. Of course
it could very well happen that once this is implemented properly the
gains are far lower, but I think it's worth a try.

>      - Vlad

More information about the cairo mailing list