Hi,
The following patch series add a new API for caching and compositing glyphs. Compositing entire strings of glyphs in one go is a substantial reduction in overhead by itself, but the series also contains a few optimizations that exploit glyph specific properties of the compositing operations. The API is centered around the concept of a glyph cache, which is essentially a hash table that maps two keys (they are called "font" and "glyph" in the API to suggest why there are two, but pixman doesn't actually care what they represent) to an opaque pointer that represents a stored glyph. To composite a glyph string, an application is supposed to walk its list of glyphs and look each one up in the cache. If it isn't there, the application must produce a rasterization in the form of a pixman image and insert it into the cache. Then, the opaque pointers returned from the cache along with glyph positions, are passed back into pixman for compositing. While this is going on, the cache must be "frozen", which basically means that glyphs will not be evicted from it. That way, the application can be sure that all the glyphs are available at compositing time. Afterwards, when the cache is "thawed", it may decide to evict some glyphs if the cache is too full. There are a few more details about the API in patch 2/8. I'll post separate patches that port the X server and cairo over to use this new API. These will contain performance results, but here is a summary: cairo: Speedups firefox-talos-gfx 5919.67 -> 4360.70: 1.36x speedup xfce4-terminal-a1 1600.87 -> 1264.19: 1.27x speedup gnome-terminal-vim 1925.08 -> 1788.56: 1.08x speedup firefox-planet-gnome 6906.81 -> 6480.79: 1.07x speedup Slowdowns poppler-reseau 370.01 -> 397.08: 1.07x slowdown X server: Speedups: firefox-talos-gfx 13669.42 -> 3717.03: 3.68x speedup xfce4-terminal-a1 1842.63 -> 1086.13: 1.70x speedup evolution 1401.95 -> 897.70: 1.56x speedup gnome-terminal-vim 1859.13 -> 1192.92: 1.56x speedup poppler 1650.37 -> 1244.72: 1.33x speedup firefox-planet-gnome 7300.14 -> 5751.90: 1.27x speedup gvim 1385.19 -> 1284.40: 1.08x speedup Soren _______________________________________________ Pixman mailing list Pixman@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pixman