[cairo] Patch improving fallbacks

Kristian Høgsberg krh at bitplanet.net
Mon Jan 31 15:09:45 PST 2005


Owen Taylor wrote:
> On Mon, 2005-01-31 at 09:20 -0800, Keith Packard wrote:
> 
>>Around 11 o'clock on Jan 31, Owen Taylor wrote:
>>
>>
>>>image_extra is just a void * for the backend to save a pointer
>>>to backend specific resources.
>>
>>If it's part of the image, it seems like we should tie it to the image 
>>instead of having to carry it around separately.  It seems mystic to have 
>>this separate argument floating around.
> 
> 
> It's just private API :-) ... I was trying to keep my changes as
> simple, and because the API was already paired adding the void ** was 
> simple and didn't get into other issues.
> 
> If we can come up with a good user data system for surfaces, then
> we could remove this.
> 
> My current thought for user data for surfaces is something pretty
> generic:
> 
>  cairo_key_t cairo_key_alloc (void);

What about just using a void pointer as key?

	static int pdf_backend_data_key;

	cairo_surface_set_data (&pdf_backend_data_key,
				some_pdf_data,
				destroy_some_pdf_data);

cheers,
Kristian



More information about the cairo mailing list