Speed up _pixman_composite_glyphs_no_mask()
authorSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 28 May 2012 06:36:22 +0000 (02:36 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 2 Jun 2012 12:19:38 +0000 (08:19 -0400)
commit934c9d8546b71ddea91ac16b0928101903e2608e
tree19ece1a6b1ca0cbf405ac0b26486338a4881ad4a
parenta162189dc0fa9978a3b5b6dd24f9bc12995805ed
Speed up _pixman_composite_glyphs_no_mask()

Bypass much of the overhead of pixman_image_composite32() by only
computing the composite region once instead of once per glyph, and by
only looking up the composite function whenever the glyph format or
flags change.

As part of this, the pixman_compute_composite_region32() was renamed
to _pixman_compute_composite_region32() and exported in
pixman-private.h.

I couldn't find a trace that would reliably demonstrate that this is
actually an improvement by itself (since _pixman_composite_glyphs_no_mask()
is called so rarely), but together with the following optimization for
solid sources, there is a small but reliable improvement to the
xfce4-a1-terminal cairo trace.
pixman/pixman-glyph.c
pixman/pixman-private.h
pixman/pixman.c