[Cairo] Cairo on older X servers, (eg. with Render version 0.2)
cworth at east.isi.edu
Fri Oct 10 07:00:35 PDT 2003
On Oct 10, Lars Segerlund wrote:
> I have checked out cairo from the new cvs, and now it build's and
> runs on an old xserver ( 4.2 )
I'm glad to hear that.
> I still don't get all the graphics, ( some are not output, but
> now I'm looking at it ).
I expected it to be slow, but not missing pieces. What is not
And as for speed, I've done the experiment and it doesn't look hard to
get rid of all the XGetImage traffic and most of the XPutImage traffic
that currently happens when rendering to an old server.
The trick to being able to do this is to add a few new functions which
allow the user to give Cairo the information it needs:
/* Clear the current target surface (to solid white). */
cairo_erase (cairo_t *cr);
/* Guarantee that the results of all previous painting
commands have been applied to the surface. */
cairo_flush (cairo_t *cr);
/* Must be called whenever the current surface has been
drawn to by something other than cairo. */
cairo_mark_dirty (cairo_t *cr);
Many thanks to Keith Packard and Miguel de Icaza for help in designing
this API. As always, API feedback is welcome. If this seems reasonable
to everyone, it should be almost trivial to implement in Cairo.
It will mean that existing applications will have to be patched
slightly, (the most common change is to add a call to cairo_flush just
before doing the copy from the double buffer).
More information about the cairo