[cairo] Refactoring user data handling
Mike Emmel
mike.emmel at gmail.com
Thu Apr 7 19:54:37 PDT 2005
This reminded me I had a question there is a callback to the user
data when a surface is destroyed I'd like to have a callback when a
surface is
attached during the cairo_set_target_surface
Is that possible ?
Mike
On Apr 7, 2005 5:26 PM, Owen Taylor <otaylor at redhat.com> wrote:
> The attached patch moves the real work of user data from cairo_surface
> to a _cairo_user_data_array structure.
>
> I took a couple of shortcuts:
>
> - I did
n't create a separate _cairo_user_data_array structure, and
> just used another typedef for _cairo_array.
>
> - I put cairo_user_data_array_t in cairo-array.c, rather than
> creating a separate source file.
>
> I think these are acceptable for an internal object, but could easily
> be addressed if people feel it is necessary.
>
> The goal of this work is to add cairo_font_face_set_user_data() ...
> that, along with a few other gymnastics will allow fixing the
> lifetime problems of cairo_ft_font_face_create_for_ft_face().
>
> (Currently, you can never tell when it is safe to free the FT_Face)
>
> Some declarations in cairo.hare moved around looking forward to that so
> that the user data types can be used earlier in the file.
>
> Regards,
> Owen
>
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.freedesktop.org/mailman/listinfo/cairo
>
>
>
>
More information about the cairo
mailing list