[cairo] [cairo-commit] 12 commits - src/cairo-analysis-surface.c src/cairo-directfb-surface.c src/cairo-gstate.c src/cairo.h src/cairoint.h src/cairo-jpeg-info.c src/cairo-jpeg-info-private.h src/cairo-meta-surface.c src/cairo-meta-surface-private.h src/cairo-paginated-surface.c src/cairo-pdf-surface.c src/cairo-pdf-surface-private.h src/cairo-ps-surface.c src/cairo-ps-surface-private.h src/cairo-quartz-surface.c src/cairo-surface.c src/cairo-surface-fallback.c src/cairo-surface-private.h src/cairo-svg-surface.c src/cairo-type1-subset.c src/cairo-type3-glyph-surface.c src/cairo-win32-printing-surface.c src/cairo-win32-surface.c src/cairo-xlib-surface.c src/Makefile.sources src/test-meta-surface.c src/test-paginated-surface.c test/cairo-test.c test/README

Adrian Johnson ajohnson at redneon.com
Mon Nov 3 05:52:13 PST 2008


Behdad Esfahbod wrote:
> Adrian Johnson wrote:
>>  src/cairo-jpeg-info-private.h      |   54 +++++++++++
>>  src/cairo-jpeg-info.c              |  142 +++++++++++++++++++++++++++++
> 
> These two are short enough to live in cairoint.h and cairo-misc.c.

There will be additional code required for each of the remaining four 
image types I will add. Maybe they could all go in a 
cairo-image-format.c or cairo-image-info.c.

 >>[snip]
> 
> This is the wrong approach.  The getter returns NULL for any types it doesn't
> understand.  The idea is to keep anything the user sets, and let the backend
> use as appropriate.
> 
> The way it should be done instead is using a central interned string store
> (cairo_user_data_key_from_string() implemented using a hash table), plus the
> currently in place user-data facilities.

I probably should have explained in the commit message that it is still 
a work in progress and when I add the next image format I would convert 
it to use the user data facilities. Fortunately Chris Wilson has already 
beaten me to it and extended the implementation to as you describe.



More information about the cairo mailing list