[Pixman] [cairo] Increasing performance through opencl standards
ranma42 at gmail.com
Sun Sep 12 04:37:54 PDT 2010
On Mon, Sep 6, 2010 at 8:55 AM, Abhishek Sharma
<spyzer.abhishek0 at gmail.com> wrote:
> Hi all,
> I am rather new to cairo development(never submitted a bug, or a patch), yet
> I wish to put forth a proposal to all the developers of cairo.
> I am a student about to finish my B-Tech in 7 months or so. I am studying a
> subject namely Parallel Computing. In this I am supposed to make(enhance) a
> project to prove my skills. Now I was also a GSOC developer for the org
> inskcape this year. So i thought of increasing inkscape's performance using
> opencl. But the developers their told me that most of the performance of
> inskcape actually depends on cairo. Thus parallelizing cairo will help other
> FOSS as well.
> And so here I am. I propose that I wish to start the cairo parallelization
> using opencl. Functions like transformation and all, all these can be
> implemented through opencl. Though we need to take care of many things while
> parallelization . For instance, parallel programs require a totally
> different methodology to increase performance(Gustaffson's Law and Amadahl's
> Law) and may entirely change the look of the serial code, so will that be
> allowed?? Does a function really need to be parallelized and if yes, then
> what approach should be followed so that the parallelization doesn't result
> in poor performance instead??
> So to deal with all these sorts of questions and to BEGIN with cairo
> development(as in "WHICH" code to parallelize) I would like to start a
> discussion among the developers of this community to kindly come forward and
> post their reviews and ideas.
I would suggest you to skim through pixman. It does the compositing
for cairo and this
is very often the hot spot (as you already noticed profiling the code).
Moreover pixman is simpler to parallelize, since most operations are actually
parallel on a pixel or scanline level (which will often be more than
the number of
processing cores you actually have).
Cairo might also profit from parallelization in a couple of places,
but it would be much
harder to get real improvements (it would probably require changing or at least
restructuring the algorithms employed).
Adding an opencl-based pixman backend should be quite simple, since
you can start
with nothing (just fallbacks) and then add whatever functions you think you can
Have fun hacking on cairo/pixman ;)
More information about the Pixman