[cairo] Re: "retained" surface for cairo

Carl Worth cworth at east.isi.edu
Mon Jul 19 12:06:41 PDT 2004


On Mon, 19 Jul 2004 20:23:14 +0200 (CEST), =?iso-8859-1?q?Jost=20Boekemeier?= wrote:
> what do think about a surface that draws "lazy" so
> that cairo could accept huge surfaces which would
> otherwise exceed the X server memory?
> 
> Such a surface would apply the transformations on the
> client-side so that when the composite operation is
> requested we can decide what to send to the server and
> what not.

I'm not sure I follow. I don't see how what you propose requires
anything different from what we have already.

Cairo is a client-side library, so it is already applying
transformations on the client-side. And it provides a user-space
coordinate system specified by doubles, so it is already possible to
request things to be drawn that lie outside the bounds of the current
surface. All backends, (including X), happily ignore any objects that
are outside the bounds of the surface.

The only thing I've seen missing in this regard, is that cairo should do
some culling to avoid sending geometry that it knows will be
ignored. But this is simply an optimization of the implementation which
does not require any change to the interface, (such as a new surface
type).

> The only disadvantage I see is that this surface is
> "software-only" and that it dublicates much of the X
> server's render code.

Nothing to worry about there. We've already got a full-software
implementation with cairo's "image" backend, (implemented by
libpixman). And yes, it does duplicate code from the X server. The plan
is to eliminate the redundancy at some point by getting the X server to
use libpixman itself.

-Carl



More information about the cairo mailing list