[cairo] reference counting vs garbage collection

Carl Worth cworth at cworth.org
Tue Jan 4 18:01:14 PST 2005


On Tue, 04 Jan 2005 18:10:10 -0500, Kristian Høgsberg wrote:
> A more radical approach to all this could be to drop the concept of a 
> default target and then add a surface parameter to the functions that 
> draw to the surface.  E.g.
> 
> 	cairo_stroke (cr, surface);
> 	cairo_fill (cr, surface);

No thanks. That goes down the same road of the Xlib drawing APIs,
(cf. repeated enumeration of Display, Drawable, and GC in call after
call). This is something I've explicitly wanted to avoid in cairo.

Similarly, if this were the only way to draw, then cairo would force
the user to maintain a minimum of two objects, (cairo_t, and
cairo_surface_t), rather than the current one. That would be a net
loss in ease of use.

I think we'll be able to solve this issue with a new cairo_surface
function. Though, as usual, coming up with the right name is the
hardest part...

-Carl



More information about the cairo mailing list