Jim.Gettys at hp.com
Tue May 31 18:07:42 PDT 2005
Don't presume that writing a region library from scratch is easy
(stealing code is the right solution). It turns out it is painful to
get all the fencepost cases right, and when you get it wrong, you lose
rectangles (*really bad*). *The* most painful part of shipping X11R1
was debugging the region code...
And yes, the server code got carefully worked on at some point; and I'm
not surprised that Xlib never got its TLC.
On Tue, 2005-05-31 at 14:42 -0700, Carl Worth wrote:
> On Tue, 31 May 2005 13:01:02 -0700, Jamey Sharp wrote:
> > I don't know if the semantics have drifted: does libpixman's region code
> > have subpixel precision now or something? Carl and Keith should know,
> > and both are on this list: maybe one will chime in here.
> I haven't changed any semantics in the region code.
> When I went shopping for a region implementation I found two
> versions. One in the X server, and one in Xlib. The two versions
> obviously had common heritage, but one had a significant memory
> optimization for the common case of a single-rectangle region (or
> something like that --- and I think it was the server's version that
> was more efficient). I grabbed the more efficient version and made
> libpixregion from it.
> > Unfortunately the Cairo folks merged the software implementation of
> > Render together with the region code into one library, so libpixman
> > still isn't a minimal region implementation.
> Yes. People complained about lots-of-little-libraries problems[*] so I
> combined libpixregion in with libpixman.
> [*] Of the two complaints, I think both are basically bogus. One was
> that it's "hard" to build lots of little libraries. This argument
> doesn't hold much weight with me since almost everyone gets their
> libraries automatically through a package system, (and build systems
> for those who don't are getting better).
> The second problem was that link time loading is inefficient in the
> number of libraries. On this point I agree with Bart that this
> indicates a bug in the linker, but the way things are now I decided
> not to push the point with libpixregion.
> xcb mailing list
> xcb at lists.freedesktop.org
More information about the xcb