[Cairo] Cairo on older X servers, (eg. with Render version 0.2)

Keith Packard keithp at keithp.com
Sun Oct 12 09:57:44 PDT 2003


I was thinking about the new functions Carl mentioned to permit 
asynchronous drawing for legacy X servers.  I fear that applications won't 
effectively test against such servers and so we'd better make sure that 
semantics for both targets are as close as possible.

	/* Clear the current target surface (to solid white). */
	void
	cairo_erase (cairo_t *cr);

I'd like cairo_erase to be implicitly called at cairo_set_target_surface
time unless the application specifies otherwise.  Essentially, we want to
know if the surface is dirty or not at this time.  A 
'cairo_surface_mark_dirty' API could perform this task.

	/* Guarantee that the results of all previous painting
	   commands have been applied to the surface. */
	void
	cairo_flush (cairo_t *cr);

I'd like to see if we can't make this call unnecessary in essentially all 
cases.  Xlib provides extension hooks to track calls to XFlush; with 
sufficient care, I think we could take advantage of that to push cairo 
changes across the wire in a timely fashion.  cairo_flush may still be 
needed to synchronize within an application when mixing cairo and 
non-cairo rendering calls.

-keith






More information about the cairo mailing list