[cairo] new pattern interface patches and some great news about the OpenGL backend

David Reveman c99drn at cs.umu.se
Fri Mar 26 16:23:16 PST 2004


I've now put together two new cairo patches. A pattern patch and an
OpenGL backend patch. The OpenGL patch requires that the pattern patch
is first applied.

All the demos available from the location of the patches have been
updated to work with the new patches.

This new pattern patch replaces
cairo_set_pattern (cairo_surface_t *surface)
with
cairo_set_pattern (cairo_pattern_t *pattern)
so all applications that use this function will need to be updated.
You can have a look at my modified version cairo-knockout.c if you like
to know how this could be done. The patch is not final yet so don't put
too much work into it.

A lot have happened to the OpenGL backend. It's now a glc backend with
only one function:

cairo_set_target_gl (cairo_t *ct, glc_surface_t *surface)

cairo_gl_surface.c went from 1303 lines to 817 lines. =)
This doesn't mean that applications need to do a lot more, they need to
do pretty much the same as before.

I've added clipping support to libglc. Even non-rectangular clipping is
supported by libglc. Maybe we can make cairo not only push back
rectangular clipping regions to the backends but also non-rectangular
clipping.

A great new feature of libglc is it's ability to use the stencil buffer
for compositing triangles and trapezoids. This means the following:

* The OpenGL backend can accelerate more graphic cards.
* Already accelerated cards becomes even faster.
* pbuffer multisample support is not required for onscreen anti-aliased
trapezoids. 

So if you haven't tried the OpenGL backend yet, now is a good time.
Please report both successful and unsuccessful driver/graphics-card
combinations to me or Peter Nilsson (c99pnn at cs.umu.se). We're trying to
put together a table over working driver/card combinations for
www.cairographics.org.

patches and demos available from here, as usual.
http://www.cs.umu.se/~c99drn

- David

-- 
David Reveman <c99drn at cs.umu.se>





More information about the cairo mailing list