analyze_extents: Fast path for non-transformed BITS images
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 12 Sep 2010 10:07:41 +0000 (06:07 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Tue, 21 Sep 2010 12:31:09 +0000 (08:31 -0400)
commit4fa33537d7093ac759b7ded1718a628dacd2aff4
tree3c3c1197f1822c6febbc8f4dc4b797cfbc139a92
parentc97881fe3c3a0af78cf5953d2c135654440b0269
analyze_extents: Fast path for non-transformed BITS images

Profiling various cairo traces showed that we were spending a lot of
time in analyze_extents and compute_sample_extents(). This was
especially bad for glyphs where all this computation was completely
unnecessary.

This patch adds a fast path for the case of non-transformed BITS
images. The result is approximately a 6% improvement on the
firefox-talos-gfx benchmark:

Before:

[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]    image            firefox-talos-gfx   13.797   13.848   0.20%    6/6

After:

[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]    image            firefox-talos-gfx   12.946   13.018   0.39%    6/6
pixman/pixman.c