[cairo] Port to standalone pixman

Soeren Sandmann sandmann at daimi.au.dk
Tue Jun 19 19:26:12 PDT 2007


Hi,

Recently I have been porting cairo to use a standalone version of the
pixman library. This library is already being used by the X server.

You can find the pixman library in

        git.freedesktop.org/git/pixman

and the cairo port is at

        people.freedesktop.org/home/sandmann/cairo-pixman


The test suite passes as well as it did before, and performance looks good:

        http://people.freedesktop.org/~sandmann/pixman-performance.txt

Most tests are faster, some substantially so. Of the slowdowns, the
three worst:

        image-rgb        fill_image_rgba_over-128    0.30 0.66% ->   0.49 2.06%:  1.50x slowdown

        image-rgb       fill_image_rgb_source-128    0.54 0.49% ->   0.81 1.00%:  1.48x slowdown

        image-rgba              subimage_copy-256    0.00 1.26% ->   0.00 1.42%:  1.10x slowdown

all go away when run with 10,000 iterations. This one:

        image-rgb     paint_similar_rgba_over-256    0.83 0.92% ->   0.89 0.21%:  1.08x slowdown

is the first one that is real and survives at 10,000 iterations.


Running the performance test suite at 10,000 iterations uncovered a
problem. The cairo-perf program essentially does this:

        for (i = 0; i < n_iters; ++i)
        {
                timings[i] = run_test();

                compute_stats (i);
        }

where compute_stats() involve sorting the timings array. This means
not only that the test suite is horribly slow with many iterations,
but also that the numbers will be unreliable due to the cache effects
of sorting a huge array between iterations. So the numbers above are
all done with the compute_stats() call moved out of the loop[1].



Soren

[1] The patch is here: http://people.freedesktop.org/~sandmann/stats.patch


More information about the cairo mailing list