[cairo] Trouble with glitz backend with cairo 1.5.7

gandalfn gandalfn at club-internet.fr
Sun Jan 27 23:45:09 PST 2008


I use intensively glitz cairo backend in cairo-compmgr, it work fine
with cairo 1.4.x, but recently i experiment latest cairo git source and
i have some trouble with it.  When i used it, like this:

cr_glitz = cairo_create(glitz_surface)
surface = cairo_glitz_surface_create(...)
cairo_set_source_surface(cr_glitz, surface, x1, y1);
cairo_set_source_surface(cr_glitz, surface, x2, y2);

the first paint works fine, but second don't do anything, after some
investigation, it's seem the problem came from set clipping in glitz
backend. The recent modification in this backend allocate a glitz_box_t
array and pass it to glitz_surface_set_clip_region
(_cairo_glitz_get_boxes_from_region). The problem is glitz use directly
the pointer of this array which is freed by glitz backend. I tried first
to copy this array in glitz, but it don't resolve anything. The only
solution I found to fix it, is a bad hack which revert last modification
to pass directly directly pixman region at
glitz_surface_set_clip_region, patch attached here, i also remove
clipping clear on  _cairo_glitz_surface_get_image, i think it isn't
really needed and it's improve slightly performance.

I hope that i was rather clearly, my level of english isn't very high

gandalfn <gandalfn at club-internet.fr>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glitz-clip-fix.patch
Type: text/x-patch
Size: 2632 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080128/01eea132/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.cairographics.org/archives/cairo/attachments/20080128/01eea132/attachment.pgp 

More information about the cairo mailing list