[cairo] Re: [Mesa3d-dev] another point in the Glitz paper
cworth at east.isi.edu
Thu Apr 22 11:15:26 PDT 2004
On Thu, 22 Apr 2004 10:43:21 -0700 (PDT), Jon Smirl wrote:
> Isn't this an example of a fundamental performance problem in the Cairo API.
> Cairo allows non-simple polygons. I agree that this is definitely simpler for
> the programmer but it doesn't efficiently accelerate.
Not a fundamental performance problem. Just an indication that cairo
provides a higher-level interface than OpenGL. This is by design.
> To accelerate this the API needs to be split. You need a polygon tesselate
> function and a draw simple polygons function. If you don't split the function
> the list of polygons has to be sent through the tesselator every time the
> polygons are drawn. With the split model you tesselate the list once, if at all,
> and then feed the polygons repeatedly to the draw simple polygon function.
It's easy to see that avoiding repeated application of software
algorithms will be important to high-performance, interactive
But it's not as obvious to me that the API has to be changed much to get
that. Cairo could simply provide an opaque path object that can manage
the caching of its tessellation.
That would provide an API that's just as easy to use, and would cover
all of the performance issues except for the "if at all" case. And if a
user really needs that, then I would recommend that user go use OpenGL
rather than cairo.
More information about the cairo