[cairo] blitjit - Just In Time Image Blitting Library For C++

Petr Kobalíček kobalicek.petr at gmail.com
Tue Mar 3 04:55:40 PST 2009


I'd like to present blitjit library
(http://code.google.com/p/blitjit/). It can compile image compositing
functions on x86 and x64 platform just in time.

There were several posts about generating compositing code by jit
compiler. I think that there is no one that can replace pixman at this
time, but blitjit can be used in pixman itself to gain performance.

Blitjit is written in C++ language and for compiling uses AsmJit
library (http://code.google.com/p/asmjit/ - I wrote both), both
libraries are distributed under MIT licence, so there is no
restriction to using them in any project.

Currently in blitjit is implemented ARGB32 premultiplied pixel format
and many compositing operations. Jit compiler is really optimized and
produces quite good results (I think). Adventages are that through
AsmJit compiler it can generate code for both x86 and x64 platforms
without modifying jit code generation. It can also handle functions
calling conventions (you can change it for example to fastcall). There
is also possibility for logging and customizing assert (crash)

Testing images generated by blitjit library are here:

Generated and compiled jit assembler for ARGB32 pixel format and
CompositeOver operation is here:

Something about blitjit was also discussed in antigrain mailing list
and there is also mailing list dedicated to blitjit itself (see
blitjit homepage).

I'm also looking for developers that can help me to design and finish
blitjit library and also for volunteers that can add blitjit support
to pixman. Currently I'm developing it for my own library, but I think
that adding support to others is not bad idea.

- Petr

More information about the cairo mailing list