[cairo] Newbie backend questions

Jacob Gorm Hansen jacobg at diku.dk
Thu Feb 10 18:04:36 PST 2005


hi,

I am new to Cairo, and I am trying to write my own backend for a system 
where all grahics are sent to the screen as 32x32xARGB tiles.

I have been hacking my own version of the image backend, the idea was to 
initially wrap calls to the pixman rendering functions in loops drawing 
to 32x32 pixman_images, and then changing the image->pixels->data 
pointer as I go, though it seems I would need to extend the interface to 
libpixman to allow offsetting of input data.

An alternative would be to modify libpixman to support a different 
memory layout for images, with a switch at creation time.

Are any of these ideas insane / has other had experiences doing 
something similar?

Also:

When reading through functions such as pixman_composite_trapezoids(), 
there seems to be quite heavy use of malloc() and free(), even though 
the data structures created are constant-size and go out of scope 
quickly. Is there a good reason that these are not allocated on the 
stack, as that presumably be faster and more robust?

best regards,
Jacob



More information about the cairo mailing list