[cairo] libpixman - libpixregion, libic and slim merged; cairo built with it

Dave Beckett dave.beckett at bristol.ac.uk
Tue Dec 9 15:38:12 PST 2003

On Tue, 9 Dec 2003 15:01:49 -0500
Carl Worth <cworth at east.isi.edu> wrote:

> On Dec 8, Dave Beckett wrote:
>  > and did that.  So I've taken the CVS versions of libpixregion,
>  > libic and slim and made a new library libpixman version 0.1.0 which
>  > exports a header pixman.h (merge of pixregion.h and ic.h).
> Thanks Dave!
> This is a great start. Next, we just need to give everything
> consistent names. So:
> 	PixRegion -> pixman_region_t
> 	PixRegionCreate -> pixman_region_create
> 	etc.
> 	IcFormat -> pixman_format_t
> 	IcFormatCreate -> pixman_format_create
> 	etc.
> 	IcImage -> pixman_image_t
> 	IcImageCreate -> pixman_image_create
> 	etc.
> We should probably take this chance to clean up the worst warts in the
> interface too. For example, PixRegion is inconsistent with respect to
> box vs. rect(s). My recommendation would be:
> 	PixRegionBox -> pixman_rectangle_t
> 	PixRegionPointInRegion -> pixman_region_contains_point
> 	PixRegionRectIn -> pixman_region_contains_rectangle
> 	PixRegionNumRects+PixRegionRects -> pixman_region_to_rectangles
> which can then be merged with the old IcRectangle type, (though that
> will require some code changes to deal with x2,y2
> vs. width,height).

I'd prefer at this point to structure the changes to get libpixman done.
Firstly, check what I have now into CVS.  Then rename all the names
(functions, types) in one go.  Finally merge structures and code and
continue development from there.  At that point cairo would changed to
match the calls, types and library name ahcnges.

During the above, I'd ask for no changes to either libpixregion or
libic, otherwise some bits might get dropped.

> Much worse is the disgusting fact that PixRegionAppend leaves an
> invalid region. The call to PixRegionValidate should be absorbed into
> the implementation of PixRegionAppend, and PixRegionValidate can be
> removed from the interface.

I'll leave that for you ;)

> Feel free to shove this all into CVS. I would recommend doing a
> repository copy to preserve history, but I already botched that and
> lost history when I copied all of this code from the X server. (That
> is, unless someone wants to go back and recover that for us).

I've done by-hand CVS repository copying in the past to preserve
history so should be able to do this for libpixman, repeating what I did
by hand but using CVS to add to the changes.  Unless anyone hollers,
I'll start doing this, it might take a few days.


More information about the cairo mailing list