[cairo] A new OpenGL backend for Cairo

Luca Barbieri luca at luca-barbieri.com
Sun Jun 14 07:21:06 PDT 2009

I've pushed a new version which actually compiles :) (I merged it with
HEAD from the common ancestor of HEAD on Anholt's gl backend but did
not compile it...)

It includes a modified cairogears demo (use -glx for direct rendering
and try TEX and CLIP) and a modified flowers demo.

It also adds hardware acceleration for 2-stop padded linear gradients
(i.e. the typical case) using a per-gradient 2-texel texture (which
makes flowers run fast, currently at about 120 fps on my machine).

Path clipping is a problem because we need antialiased clipping, which
seems not doable with either stencil and depth buffer and
unantialiased non-region clipping paths would seem to be a seldom used

We may want to use a depth/stencil + texture approach (or maybe a
depth/stencil texture used both as a buffer and texture if that works)
to take advantage of early-z/early-stencil, but it is complicated to
do and has dubious value.

The current clip region code could however be changed to render to
stencil in case the number of rectangles is over a threshold (so that
we avoid the current O(clip * geometry) primitive setup / vertex
shading complexity).

More information about the cairo mailing list