[cairo] Compositing benchmarks

jose_ogp at juno.com jose_ogp at juno.com
Sun Mar 4 21:39:37 PST 2007


> In my investigation into 'fixing' libpixman cairo's software
> compositing code, I built a benchmarking suite for different
> software and hardware compositing libraries.
> 
> In theory, it supports the following backend:
> - cairo
> - pixman (directly)
> - cairo-glitz
> - cairo-xlib
> - glitz
> - liboil
> - evas_core (compositing routines from enlightenment)
> - intel performance primitives
> 
> ....
> ....

	Interesting. I can tell you that evas' blending routines
use an approximation to the 'ideal' blending equation, which cairo
chooses to follows more exactly.. hence likely the speed difference
between these two. If liboil has something closer to cairo's, then
that would be a great improvement indeed. If not, well, cairo already
has a choice of filtering 'quality', so perhaps it could offer a
choice of compositing 'quality' - especially if the speed gains are
large and the 'quality loss' is small.

	It's curious to see how different sets of criteria lead to
various choices in design and implementation.
	In evas for example, one wants to balance sometimes competing
needs such as speed, low memory use, and good visual quality. This
last is important, though somewhat vague.
	I once did a very unscientific test where I had several
people look at the result of blending several images using various
approximations to an ideal definition of 'over' blending. I asked
them to tell me if they could see any differences.. No one could.

	Surely this is a foolish way to develop visual criteria,
but it was interesting enough that I've performed a few other
similar tests on such "typical viewers".
	Recently, I had several scaling algorithms I wanted to test,
including cairo's (among others), and again asked if they could see
any difference.
	This time, however, there was a rather different reaction
from my test subjects. As I varied the x,y scaling factors below
1/2,1/2 and further, all of the methods that did not sample the
src image in full - and this includes cairo - were eventually
reported as giving results that were: "not clear", "blurry",
"uneven", "missing things", and other similar such remarks.

	It's curious to me that cairo puts so much emphasis on
the 'accuracy' of compositing calculations - variations of which
people are unable to discern - and yet seems to put much less
emphasis on the 'accuracy' of scaling results - variations of
which people note as giving considerable differences.
	Obviously there's a reason for this seeming disparity
-- possibly it's the desire to have a single unified method for
dealing with transforms... But I would say that this is an area
that could use more looking into.

   jose.




More information about the cairo mailing list