[cairo] Stroking using polygons

argiris kirtzidis akyrtzi at gmail.com
Fri Nov 21 04:59:33 PST 2008


I'm developing a GPU backend for cairo (it uses either OpenGL or Direct3D).

When stroking a path, cairo produces polygons which get tessellated into 
trapezoids and pushed to the backend. Trapezoid tessellation is totally 
unnecessary for a GPU backend since it can render the polygons directly.

Would you be interested in a patch that allows the stroking functions to 
call custom functions and pass them a triangle/rectangle/quad/polygon ?
It should work kind of like _cairo_path_fixed_interpret which also calls 
custom functions for move_to, line_to, curve_to, etc.

By default the stroker would be called with the normal 
trapezoid-tessellation functions:


but a GPU backend would be able to pass its own functions that do a 
direct rendering of the polygons.


More information about the cairo mailing list