[cairo] some fixes and improvements to current cvs version of cairo

David Reveman davidr at novell.com
Mon Jan 31 15:48:48 PST 2005


On Mon, 2005-01-31 at 12:05 -0500, Carl Worth wrote: 
> On Fri, 28 Jan 2005 22:44:26 +0100, David Reveman wrote:
> > It includes a fix for the _cairo_gstate_init bug. This fix adds a
> > default_pattern to the cairo_gstate struct and cairo_set_rgb_color can
> > use this without allocating and destroying patterns all the time, and
> > cairo_gstate_init can no longer fail. What do you think?
> 
> Does reducing the mallocs actually have any performance benefit here?

I don't know, probably not.

> 
> Another approach to fixing the potential failure of cairo_gstate_init
> would be to make the allocation of the pattern lazy, (someone recently
> fixed gstate->font in a similar way). That might be slightly less
> complex.

I think you're right. I've fixed this in my current patch.

-David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-pattern-update-050201.diff
Type: text/x-patch
Size: 96476 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050201/a996baeb/cairo-pattern-update-050201.bin


More information about the cairo mailing list